The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
Rev
3 years agoNew Contributor II
passing multiselect combo-box as parameter
Hi,
ParamA will be a multiselect combo box and the same should be passed to business rule as well.
May I know how it can be done? I'm passing the parameter in calculate button, then DM step and then to BR.
Calc button : {seq_name}{ParamCC = |!ParamA!|}
DM step: {|!ParamCC!|}
BR: Get value of ParamCC
Need suggestion on how should it be passed if parameter is multiselect.
thanks
Hi.
You can split the string in the receiving business rule by delimiter e g comma
Dim split as String() = args.NameValuePairs.XFGetValue("ParamCC").Split(",")
Then loop through rresults to get each selection e.g
For Each param As string in split
' Do Something
Next
8 Replies
- seburnNew Contributor III
Hi.
You can split the string in the receiving business rule by delimiter e g comma
Dim split as String() = args.NameValuePairs.XFGetValue("ParamCC").Split(",")
Then loop through rresults to get each selection e.g
For Each param As string in split
' Do Something
Next
- RevNew Contributor II
Thanks Seburn.I tried the suggestions provided and it works partially.Means when list of members were passed in ParamCC, it works only for the first parameter.
Dim split as String() = args.customcalculateargs.NameValuePairs.XFGetValue("ParamCC").Split(",")
For Each param As string in split
api.logmessage(param ) ( Im able to print each param)
' Do Something (but it works only for first parameter passed)
Next
- seburnNew Contributor III
OK. I think you need to check you are passing in the param value via button AND DM step with square brackets around the parameter (see above). This behavior sounds like you are only picking up the first comma separated value square brackets should fix 🙂
E.g button
seq_name}{ParamCC=[|!ParamA!|]}
E.g DM step
ParamCC=[|!ParamA!|]
- seburnNew Contributor III
P.s. make sure to put square brackets around the parameter passed in via button to pick up all comma separated values e.g
{seq_name}{ParamCC=[|!ParamA!|]}
Related Content
- 3 years ago
- 1 year ago
- 3 years ago