Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set field from variable

I want to save the selections in a field upon entering sheet1.  Then I want to manually change the selections in that field.  Then upon leaving sheet1 I want to restore the original selections that I saved.

I tried this by GetFieldSelections and storing the result in a variable.  These are years by the way.  This results in a comma separated list.  Then I change the years to what is appropriate for Sheet1.  Then when I leave sheet1 I want to put the original list of years that I saved back into the field.  I tried doing this by taking the comma separated list, adding leading and trailing parentheses and replaced the commas with pipes.

This doesn't work.  Does anyone have any suggestions?  Maybe a better way to be able to restore the values?

12 Replies
Not applicable
Author

I did as you suggested and the problem still remains.  I appreciate the time you've been putting into this.  I've attached my altered version of your example.

Not applicable
Author

I think I found the problem.  There is a default value of 6 on GetFieldSelections for how many values it will display.  So if I increase the maximum above 6, your example works.  Also, you can put the pipe directly in the GetFieldSelections function.  I'm going to try it on my actual data.  Hopefully it will work.  Thanks again.

jerem1234
Specialist II
Specialist II

You could use the concat function instead, this way you dont have worry about setting the max.

='('&concat(Prod2, '|')&')'

Hope this helps!