Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have table called HolidayTable. It has three fields DC, Dates, Holiday Flag.
If I select One particular DC and Flag = Y. Then It is showing three days. That means that DC have three holidays. I want to store those dates in Array format.
How is it possible?
Thanks,
Sarif
Use Concat function to store them in a Variable
Yes It is working...but when I am trying to apply pick function on that. pick is not working.
Do we need to change format? Is pick works only in string?
Please suggest.
Thanks,
Sarif
First of all, we are unsure what exactly you want to get !
Can you please provide your current script and also describe what you want to have end result..
You need to include quotes within your valuelist, maybe in this way:
...
chr(39) & concat(Dates, chr(39) & ',' & chr(39)) & chr(39) as ValueList
...
- Marcus
There are at least two ways of picking values out of such a string:
SubField( vMultiDates , ',' , 1)
Using Pick you have to have a more complicated Concat() to include single quotes which is Chr(39):
vMultiDates = Chr(39) & Concat( DC , Chr(39) & ',' & Chr(39) , DC) & Chr(39);
// Will give you a string like this: '11/08/2016','12/14/2016','12/30/2016' notice that it contains single quotes
Pick( 2 , '$(vMultiDates)'
, <expression-for-the-first-date>
, <expression-for-the-second-date>
, <expression-for-the-third-date>
)