Trouble Setting Default for Drop Down

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
mkasenchak
New User
Posts: 1
Joined: Thu Oct 31, 2019 1:44 pm
First Name: Marissa
Last Name: Kasenchak
Company Name: McGard
Contact:

Trouble Setting Default for Drop Down

Post by mkasenchak »

I am having trouble setting a default value for my database driven drop down.

i've tried

Code: Select all

applyProperty("SearchD1DDown", "choice values field","BPPRIT");
applyProperty("SearchD1DDown", "choice options field","ITEM NUMBER");
and i've also tried

Code: Select all

pui.set("SearchD1DDown","BPPRIT");
and i've also tried

Code: Select all

applyProperty("SearchD1DDown", "value","BPPRIT");
none of these seem to work in setting the default when the screen loads
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Trouble Setting Default for Drop Down

Post by Scott Klement »

So, you have something else set, but you are trying to change it in your onload event?

The database process to load the widget has already begun running when your onload has fired, so changing the properties there won't affect it unless you also re-render (aka "re-run" the database process) after you've changed the properties.

You'd do this with:

Code: Select all

applyProperty("SearchD1DDown", "widget type","select box");
Setting the widget type (even if it is to the same type of widget) will cause it to re-render.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests