Skip to Content

How to implement multiple selection using MDK?

Hello Experts,

We have used List picker for multiple selection. Can select multiple options but it saved as only one value which I selected first.

What we are analyzed means the list picker are passing as array in returns, so we did OnChange event listener rules with loop over collection.
To take the value from array into the string property in order to send to backend as string property. But unfortunately we are not achieved it.

We are using MDK_SDK_3_2_0_Universal version

Any suggestion/solutions here?

Regards,

Lavanya Ganapathi

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Oct 11, 2019 at 03:51 AM

    Lavanya,

    As you mention, when using a list picker in multi-select mode you can pick more than one value and the list of selected items is returned. Depending on your use case you will have to determine how you then process them.

    It sounds like you are wanting to create multiple entities in your service, one for each selected value. In this case, you will most likely want to use a javascript rule in your Save button that will loop over the selected values and call your create entity action once for each value in the array.

    The tricky part is that as you loop over the list, you will need to store the current value somewhere so the create entity action can reference it. I would recommend using Client Data at the page for the current picker value. Then in your create entity action you can target the #ClientData/#Property:<your client data name> where you are storing the current value.

    --Bill

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 11, 2019 at 03:59 AM

    You want to show this in a table, is to consider in your data model the following:

    1) Having an intermediate master entity designed just to store the information related to your parametric entity.

    2) Including in this entity a reference to the parametric entity.

    3) Having your process entity contain a collection of this intermediate master entity.

    Then, your process can have a grid to include/edit/delete rows with information related to the parametric entity values.

    Best regards,

    Add a comment
    10|10000 characters needed characters exceeded