cancel
Showing results for 
Search instead for 
Did you mean: 

How do i default an item in the entry list of the drop down list?

Former Member
0 Kudos

Hi experts,

i have a drop down list for year, entry list: 2005, 2006, 2007, 2008, 2009, 2010.

how do i make the drop down list default to the current year when the iview page launch, without require the user to select manually?

currently the drop down list is blank when the iview launch, until user select a value.

Any help is much appreciated.

Thanks in advance.

Regards,

Sarah

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

I assume this is static list of years which you have created. In the properties of dropdown box, go to the general tab. There is option at the bottom as 'Default Value' here enter the value (not discription) like "2005". then it will show it as default when you run the model.

I hope this is what you are looking for.

Regards

Sandeep

Former Member
0 Kudos

Hi Vineeth, I tried the formula too, but it doesn't work. The drop down list still remain blank when iView launches.

Hi Sandeep, thanks for your suggestion. I tried to put in value in the Default Value box too. But when iview launches, the drop down list has no default value, just blank.

Regards,

Sarah

Former Member
0 Kudos

Sarah,

As stated earlier VC tends to behave quite strange sometimes, but this works fine for me.

Hope you have tried after removing the cache too.You could probably try the same in a test copy model with just drop down to see what the problem is . Also pls let us know ur version and runtime used too.

Rgds

Answers (1)

Answers (1)

Former Member
0 Kudos

Sarah,

You can use the DGET(NOW( ),'y') function to default to the current year.

Rgds

Former Member
0 Kudos

Hi Vineeth,

Thanks for the reply. I try to set the formula provided to the Default Value of the drop down list properties.

Save and deploy. However, i still get a drop down list defaulted to blank. I must click and select to get a value.

Is the way i set default value correct?

Regards,

Sarah

Former Member
0 Kudos

Sarah,

That expression should work for numeric field. If your field is text pls try this one. NSTR(DGET(NOW(),'Y'),'NORMAL'). Also could you try deleting your brower cache and try . Some times VC tends to behave strange .

Regds