cancel
Showing results for 
Search instead for 
Did you mean: 

How to pre select a drop down list item based on a data store value

Former Member
0 Kudos

Hi

I need to pre select (or auto select) an item of a drop-down list, based on a value stored on a store data element. I am using the Default Value but unsuccessfully.

Below is the complete explanation:

I have a drop down list which contains Countries, got from a dynamic entry list from backend.

I have a data store element, with a text field named "Country", which can have only two text values: 'NAC' and 'EXT'.

So, in the Default Value of the drop down list, I wrote IF(STORE@Country=='NAC', 'AR', 'US')

So, if Country=='NAC' the drop down list should show the text corresponding to 'AR', but nothing happens...

However, if I write 'AR' directly on the Defaul Value, it DOES show the corresponding text.

Any ideas?

Thanks in advance

Marcelo

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

your expalnation to ahive the default value in dropdwon list is correct.

But what is the value present in the Country field in the datastore.

Are you giving any defualt value over there?.

if you are not giving the result is zero in the dropdown.

Regards,

Govindu

Former Member
0 Kudos

Hi Govindu, and thanks for your quick answer!

It helped me!!

Best regards!

Marcelo

Former Member
0 Kudos

Hi,

if your problem solved close this thread with points:-)

Regards,

Goivnud

Former Member
0 Kudos

Sorry Govindu,

I'm now giving you points.

Thanks again!

Best regards

Marcelo