Fabian Unruh
Posts: 0
Joined: Thu Aug 01, 2013 12:15 pm

standard value select box (query)

how can i set a standard value of a select box that gets its values from a query?

Oleg Danchenkov
Posts: 0
Joined: Tue Apr 30, 2013 5:51 pm

standard value select box (query)

I'm not sure I understand you. Could you please clarify (some examples or screenshots could help).

Fabian Unruh
Posts: 0
Joined: Thu Aug 01, 2013 12:15 pm

standard value select box (query)

Image

the select box "kanton wählen" shows a query with all cantons of switzerland. i want the standard value to be "kanton wählen" instead of the first canton of the query.

Anton Artyukh5836028
Posts: 0
Joined: Wed May 08, 2013 12:57 pm

standard value select box (query)

Hello,

You can set default value in Success-event action for service by using JS-code or setting property for selectmenu component.

Fabian Unruh
Posts: 0
Joined: Thu Aug 01, 2013 12:15 pm

standard value select box (query)

what would the js code be and what do you mean by success-event action?

Fabian Unruh
Posts: 0
Joined: Thu Aug 01, 2013 12:15 pm

standard value select box (query)

like this?

onSuccess': function(data) {return "default value";}

i'm not sure if that does the trick. i would like to display the default value as the first value in my select box. after that the query-result should follow.

Fabian Unruh
Posts: 0
Joined: Thu Aug 01, 2013 12:15 pm

standard value select box (query)

like this?

onSuccess': function(data) {return "default value";}

i'm not sure if that does the trick. i would like to display the default value as the first value in my select box. after that the query-result should follow.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

standard value select box (query)

You would need to access the component.. and set its value.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

standard value select box (query)

Dear Fabian,

We are sorry, we lost the topic due to a technical problem.
Here is a general solution (see code for Success method below):
codereturn {
'field' : data.field '',
'field1' : data.filed1 0,
...
}/code

Return to “Issues”