valuelist not updating.

Forum to discuss the new web client version of Servoy.

valuelist not updating.

Postby ashutoslenka426 » Wed Jul 05, 2017 1:18 pm

Hi All ,

I have two dropdown components attached to two valuelist . on the first dropdown change , I am populating the second valuelist pogramatically . But the drop down is not refreshing in the second component .
Should it refresh automatically ? . because the same valuelist is attached in the property , only the contents are changed . How to achieve this ?


Please provide some suggestions
AL
ashutoslenka426
 
Posts: 295
Joined: Thu Jan 26, 2012 3:38 pm

Re: valuelist not updating.

Postby dlazarescu » Wed Jul 05, 2017 4:25 pm

Hi Al,

You can do this in two ways:

- event driven: once you change the first dropdown, you call a function (dropdown 1/properties/events/onAction) that will update the valueList for the second dropdown
- through a relation: you can create a relation between a global variable and the table that is used to populate the second dropdown. The global variable should be assigned to the dataProvider from the first dropdown. Then you create a valueList where you use the Related Values option where you set the relation that you just created in the first step. And finally you assign the valueList to the second dropdown.

I hope this will work for you. I would suggest to try the second option as it is elegant and it will open new doors for you on what can be done on the Servoy platform.

Success,
Dan
dlazarescu
 
Posts: 1
Joined: Wed Jul 05, 2017 4:01 pm


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 6 guests