Stephan JanssenApril 10, 2017 at 5:45 am #4114
we’re currently working on converting our existing coaches to Spark UI. I’m trying to work with Single Select, combined with a complex object. The selected value only contains the values mapped to the Name and Value, not the other data in the object.
I’ve tried both assigning directly through the binding and using the ‘getSelectedItem’ method. Neither option works.
Do you have any solution or best-practice for this?Canan DemirFebruary 28, 2018 at 11:05 pm #5008
I have similar issue. I need to bind single select an object which is returned by an Ajax service (Customer: id, name, addres, etc.) to outgoing variable. But when I select in single select I can reach only name and value, not a whole object.
I m using IBM BPM 8.6 version.
Please help me to find a solution for that ?SPARK SupportMarch 1, 2018 at 1:08 pm #5009
The Single Select control only maps to the Complex Type for the option Display text and option value. Therefore, each option available in the select dropdown does not contain all of the property values from the Complex Type and cannot set them.
You would need to code a Function for the On Change event, perhaps using the selected value, or name in the Name Value Pair, to switch between records in the list and copy the complex type properties to the properties of the selected complex type. In this case, you would not bind the object to the Single Select control.
Stephen P.Canan DemirMarch 1, 2018 at 9:38 pm #5014
Thank you very much for your reply.Amr MahfouzApril 22, 2019 at 4:01 am #5465
how to access the full list incase of return from ajax service is used?SPARK SupportJuly 23, 2019 at 10:17 am #5509
When the service is called and the results are returned, the results are formatted into a Name Value Pair format. If you need to access the full list, say for a complex type, using a Service Call control to populate a Data control would be a better choice. Or, use a Service Call to get the results from the same service used to populate the Single Select call and access the result.items in the On Result event.
You must be logged in to reply to this topic.