Hi all,can we store any value to the variable declared in dropdown combobox

Hi,

I want to store a different value in the variable in a dropdown combobox but always its by default taking the id value of the entity for which i cannot use that variable to filter the aggregate in the preparation.

i want to store not the id but a differnt value of the same entity.Can it be possible?



Hi,

Yes is possible but you need some workaround. Lets say you have an aggregate result as "source record list" on that aggregate you need to create a new attribute with the value you want to show on the combobox and set that one on "source attribute" than you can choose the value you want to save on the variable by setting "source identifier attribute"

Regards,

Marcelo

Hi Subham Bid,

Yes it's possible:

  1.  You can create a local record variable, of the same type as the entity you want to store. 
  2.  Then assign the attribute of that record variable to the widget variable property
  3.  Set also the source entity property. 
  4.  When a user selects an option, his value will be stored by the combo box.

See here also:

Regards,

Marco Arede wrote:

Hi Subham Bid,

Yes it's possible:

  1.  You can create a local record variable, of the same type as the entity you want to store. 
  2.  Then assign the attribute of that record variable to the widget variable property
  3.  Set also the source entity property. 
  4.  When a user selects an option, his value will be stored by the combo box.

See here also:

Regards,

Still,its taking the id value whatever chages i made.


Hi Subham,


By default on select on it will store the identifier of your drop down list selected value.If you want to fetch the level or other, then again you have to write the logic to fetch the level or other attribute based on this identifier from your drop down entity.

Thanks,

Manish 

Solution

Hi Subham,

Marcelo already gave you the answer. See also here for a detailed step-by-step description by Eduardo (or download my example here).

Solution

Hi Subham Bid

I understood that you wanted to store the ID in a different attribute. My solution does not work for that case. Thanks for your observation!

Marco Arede wrote:

Hi Subham Bid,

Yes it's possible:

  1.  You can create a local record variable, of the same type as the entity you want to store. 
  2.  Then assign the attribute of that record variable to the widget variable property
  3.  Set also the source entity property. 
  4.  When a user selects an option, his value will be stored by the combo box.

See here also:

Regards,

Still,its taking the id value whatever chages i made.