Multiple Value parameter not working

Getting error 'A String is required here'

The Parameter (?StandardComments) is setup as a string.. with multiple values

1.Line1 has been chosen
2.Line2 has been chosen
3.Line3 has been chosen
4.Line4 has been chosen

I have created a Formulas based on the parameter

if {?StandardComments}
startswith '1.' then cstr(mid({?StandardComments},3,100))
else if {?StandardComments}
startswith '2.' then cstr(mid({?StandardComments},3,100))
else if {?StandardComments}
startswith '3.' then cstr(mid({?StandardComments},3,100))
else if {?StandardComments}
startswith '4.' then cstr(mid({?StandardComments},3,100))

Why won't this work.. It will work without multiple values
Michael KatzAsked:
Who is Participating?
 
mlmccCommented:
That should do it.

mlmcc
0
 
mlmccCommented:
What is the formula supposed to do?

When you have a multiple-value parameter, it is implemented as an array thus it is not a string but rather an array of strings.

You need to work on the individual elements of the array using an index  {?Standard Comments}[1]

mlmcc
0
 
Michael KatzAuthor Commented:
I want the list of values to be available and then if more than one is selected for them to appear in report..
0
 
Michael KatzAuthor Commented:
Can you help me script that?
0
 
Michael KatzAuthor Commented:
I think I got it

Making the Parameter optional as well


if  HasValue({?StandardComments})then

join({?StandardComments},chr(13) )
else ''
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.