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 a...
- 3 years ago
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
seburn
3 years agoNew 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
Rev
3 years agoNew 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
- seburn3 years agoNew 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!|]
- seburn3 years agoNew Contributor III
E.g button
{seq_name}{ParamCC=[|!ParamA!|]}
E.g DM step
ParamCC=[|!ParamA!|]
- Rev3 years agoNew Contributor II
It is due to space created for each member.Resolved using below line and it worked.
Dim ParamCC as string = (args.customcalculateargs.NameValuePairs.XFGetValue("ParamCC")).Replace(" ","")
Dim split as String() = 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
Thanks
Related Content
- 3 years ago
- 1 year ago
- 3 years ago