cancel
Showing results for 
Search instead for 
Did you mean: 

Pound sign (#) in form field throws exception

Rob_Balyeat
Champ in-the-making
Champ in-the-making

Hello,

FieldList l = document.EForm.Fields;FieldList l = document.EForm.Fields;Example HTML on eform: <input type="text"  VALUE="123456" name="OBKey_Docket_#_1" id="DocketNumber" />

C# : FieldList list = document.EForm.Fields;

System Exception: "The '#' character, hexadecimal value 0x23, cannot be included in a name. Line 1, position 23."

Is this a known issue? If so, does any one know of a work-around?

5 REPLIES 5

Rob_Balyeat
Champ in-the-making
Champ in-the-making

Errr... that didn't post right.

So the issue is an eform has a field in which the pound sign is used in the name. Using Unity API on core 10.0.0.36, and exception is thrown when trying to access the field list.

Example HTML on eform: <input type="text"  VALUE="123456" name="OBKey_Docket_#_1" id="DocketNumber" />

C# : FieldList list = document.EForm.Fields;

System Exception: "The '#' character, hexadecimal value 0x23, cannot be included in a name. Line 1, position 23."

Is this a known issue? If so, does any one know of a work-around?

Scott_Johnson3
World-Class Innovator
World-Class Innovator

Rob

It is a know issue,  If you are doing E-forms.  Use a another KW and copy to the KW with a # sign  with workflow.

Scott

Ari_Alves_Ribei
Champ in-the-making
Champ in-the-making
The problem is that you can not use the special character "#" for naming variables in electronic form.
In your example, your variable writing this "name =" OBKey_Docket_ # _1 "and this is the problem.
I think your keyword name should be "Docket_ # _1".
I suggest that in this case, use the number to include the keyword in electronic form.
For example: "Docket_# _1" with the number of keyword = 146, use in electronic form as follows: "OBKey__146_1" you no longer have this error.

Good luck

Thank you Ari, the OBKey__ is the right solution and it just completely eluded me.