Re: Populate Array type value to Character type field in a form, in the format ABCD not {"ABCD& (188 Views)
Reply
Trusted Contributor
SanjeevDas
Posts: 388
Registered: ‎06-17-2013
Message 1 of 5 (244 Views)

Populate Array type value to Character type field in a form, in the format ABCD not {"ABCD"}

Hi Experts,

 

I have a field named as DIVISION which is linked to another field of array type.

Now whenever I click on fill in the DIVISION field, the value is displayed like {"ABCD"}, whereas I want the value to be displayed as ABCD.

How do I get it to work? Do I need to write a javascript so that the value gets trim before it gets populated in the field? If so then please help me with a script.

 

Thanks.

Sanjeev

Regular Advisor
ArpitAggarwal07
Posts: 104
Registered: ‎09-10-2013
Message 2 of 5 (221 Views)

Re: Populate Array type value to Character type field in a form, in the format ABCD not {"ABCD&

Hi

 

Can you check the link from where the data is being populated . Check for the query in the link record

Honored Contributor
Piku
Posts: 4,135
Registered: ‎06-17-2010
Message 3 of 5 (206 Views)

Re: Populate Array type value to Character type field in a form, in the format ABCD not {"ABCD&

Hi Sanjeev,

It is because you have array type mapped with character also it is not correct that you link character to array type filed, because what happens in case of multiple value are there in array field.

However to correct it, put in respective link line, in Post Expressions as,
DIVISION in $File=strraw(DIVISION in $File)

hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
Trusted Contributor
SanjeevDas
Posts: 388
Registered: ‎06-17-2013
Message 4 of 5 (191 Views)

Re: Populate Array type value to Character type field in a form, in the format ABCD not {"ABCD&

Hi Piku,

 

Can you please explain the usage of "strraw".

 

Thanks,

Sanjeev

 

Honored Contributor
Piku
Posts: 4,135
Registered: ‎06-17-2010
Message 5 of 5 (188 Views)

Re: Populate Array type value to Character type field in a form, in the format ABCD not {"ABCD&

Hi,

It just convert array type to string and removes the curly braces and commas of array value.

e.g
array= {"val1", "val2", "val"}
after strraw()
array = val1 val2 val3

hth
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.