Hi,
I have a component with display type as combobox, and now I have the need to set the value of it programmatically, as far as I've tried, even when I set the value in the script the display keep show me "Please Select" text. The same thing happen to the radio button.
So as the subject stated, how to do it?
Thanks in advance for the help.
Edit:
Maybe it would be more clearer if I describe what the form is look like.
The form is consist of several pages, and on each page there are several combos display type and radio button.
I change the field content using code something like this:
fields.FIELDNAME.value = <new>
How to set the value of combobox programmatically?
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
Still cannot make this work 
The value is exists in the list (in fact, the value set is taken from the list previously).
Any other way to solved this? Or maybe the way to debug it to know what the problem is? I tried using log(), everything seems ok, the problem is that the display is not changed.

The value is exists in the list (in fact, the value set is taken from the list previously).
Any other way to solved this? Or maybe the way to debug it to know what the problem is? I tried using log(), everything seems ok, the problem is that the display is not changed.
Jon wrote:Make sure that the value you are setting for the field exists in the list associated with the field.
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
The same field on the same page? No, there is only one.
I tried to debug it by adding the button to the page, when the button clicked it will set the value of the list (I set it with A and I make sure it is exists on the list).
Still when I click the button, nothing happen, the list display is not change at all.
The other field that can be changed from within the script is of the type of textbox or date, the radio button and drop down cannot be changed.
Any other thing that should be tried?
Thanks for the help.
I tried to debug it by adding the button to the page, when the button clicked it will set the value of the list (I set it with A and I make sure it is exists on the list).
Still when I click the button, nothing happen, the list display is not change at all.
The other field that can be changed from within the script is of the type of textbox or date, the radio button and drop down cannot be changed.
Any other thing that should be tried?
Thanks for the help.
Jon wrote:Check you don't display the same field twice on the same page. If you do this, the value of the last occurrence will be set on the server. Other than that, you might try removing the list and see if the problem goes away i.e. is the problem caused by the list or is it something else?
0 x
-
- Ebase User
- Posts: 109
- Joined: Mon Sep 21, 2015 9:55 pm
Please find sample file
https://mega.nz/#!jVxQRI5C!Usc9jBEDfCTT ... 9Q0vF4qSJ4
Here, I have a static list that will populate the drop down control and a button to get and to set the value.
https://mega.nz/#!jVxQRI5C!Usc9jBEDfCTT ... 9Q0vF4qSJ4
Here, I have a static list that will populate the drop down control and a button to get and to set the value.
0 x
ebasetech v5
Skype: mateso08
Location: Kenya
Skype: mateso08
Location: Kenya
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
Sorry for a dummy question, but now
I got the files, then what should I do with those files?
I try to import but nothing added tot the designer.
I got the files, then what should I do with those files?
I try to import but nothing added tot the designer.
kotinkarwak wrote:Please find sample file
https://mega.nz/#!jVxQRI5C!Usc9jBEDfCTT ... 9Q0vF4qSJ4
Here, I have a static list that will populate the drop down control and a button to get and to set the value.
0 x
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
No, so long as the value you set exists in the list.If I set the value for the dropdown type (dynamic list) before the list is build, will the value be changed or revert back to null after the list is build?
A dynamic list doesn't use a database resource. They are two different things. You can use a database resource to create a dynamic list, but that's the end of the connection.Is every dynamic list has to have a database resource?
0 x
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
Thank you for the info.
Jon wrote:No, so long as the value you set exists in the list.If I set the value for the dropdown type (dynamic list) before the list is build, will the value be changed or revert back to null after the list is build?A dynamic list doesn't use a database resource. They are two different things. You can use a database resource to create a dynamic list, but that's the end of the connection.Is every dynamic list has to have a database resource?
0 x
Who is online
Users browsing this forum: No registered users and 4 guests