select via API REST variable

How to mount a select via API REST variable with a JSON type variable in UI Designer? I need this so I do not have to be returning to the studio to be able to select.

  1. make sure you have your BDM ready with values
  2. in your form add a variable selectValues type API with the value
../API/bdm/businessData/com.company.model.{{ yourBDM }}?q=find&p=0&c=100
  1. in your form add a variable type selectedValue type JSON
  2. in your form add a Select widget
  3. change Displayed Key to a field from the BDM
  4. change Available Values from Fx to x and enter selectValues
  5. change Value to selectedValue

for debug purposes

  1. Add a Text Widget
  2. for Text add the following
Selected customer {{ selectedCustomer | json }}

Providing everything is correct click preview
change your Select and you should see the text box change…

regards
Seán

PS: As this reply answers your question, please mark as resolved.

Do you have any idea how I can solve the need of my question? I thank you very much, I lock it for a while too and I have no idea where to start:

http://community.bonitasoft.com/questions-and-answers/add-multiple-row-ui-designer-form-process-variables

Thanks for the feedback. I believe that I expressed myself badly, I have a BDM where the information of the Clients are, where it is, for example, the code and the name of the client, and I have a BDM where are the information of the users of each client company ours, According to the client selected in the UI Designer display i can in another screen of the UI Designer show only the users of that selected company? Preferably without having to create a new task for this to make the process faster?

Yeah, completely didn’t express the question correctly…2 BDMs? :slight_smile:

Anyway easy enough to complete using the example above

Add a new Variable called Users type API with value…

../API/bdm/businessData/com.company.model..{{ yourBDM 2 }}?q=findByClient&p=0&c=10&f=Company={{selectedValue.Client}}

Add a table to your page and add Headers and Column Keys (these are the names of the BDM fields you want to display should be the same number as Headers).

then change Content from Fx to x and enter Users

save and test, when you change the Client select list you should now see the table of Users change…

It works here so it should also for you, assuming you put the right columns/names etc. in to the system

regards
Seán

PS: As this reply answers your question, please mark as resolved.

Perfect, that’s what I needed right now, Thanks for the help.

Please DO NOT refer to another question in this way - This question is answered and I don’t want to come back to it.

IF I read the other question, and IF I have time to answer it, and IF I know the answer I will repond but not like this.

This is what we call bad Netiquette.

regards

Sorry, I did not know this was something seen as something wrong on the forum, thanks for all the help so far