Question

How to pass comma separated values with double quotes as a parameter to Data Page

Hi all,

We are using Pega 7.2.2 and my requirement is to pass comma separated values with double quotes as a single parameter to a Data Page eg- "ABC", "DEF". I was able to append the values dynamically and form a string like "\"ABC\",\"DEF\"" and store it in a property. It is stored as "ABC", "DEF" but when it is passed to a Data Page, I see that in the tracer it is getting passed as ""ABC", "DEF"" which is causing problem to me. I mean it is adding double quote in the beginning and the end.

Working Scenario - I had similar requirement earlier where I had to pass the same way to autocomplete but in that case the value was a constant and I was able to directly mention it in the parameter(screenshot for reference) like "\".pdf\",\".png\"". and when I checked the Tracer it gets passed as ".pdf",".png" which was working.

Any help or pointers will be much appreciated.

Cheers

Comments

Keep up to date on this post and subscribe to comments

August 26, 2019 - 10:27pm

Hi

Why do you need slashes in your string?

 

Can you try to create the string without them.

Regards

Bhavya

August 27, 2019 - 12:13am
Response to Bhavya_Incessant

If we don't have slashes then it would consider something like this - "ABC, DEF" which is not correct.

I found a work around, I'm using whatComesAfterFirst & whatComesBeforeLast to remove those extra double quotes and storing this in a property and then passing it to Data Page.