Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Very simple question: In a select box (dropdown list) can i choose the first element for default?
Probably yes, with something like:
match(Field, subfield(concat(distinct Field, ',', SortParameter), ',',1))
- Marcus
my databse field name is:DES_REFERENTE, so my expressio will be:
match(DES_REFERENTE, subfield(concat(distinct DES_REFERENTE, ',', SortParameter), ',',1))
Right?
what i need to put in SortParameter?
The SortParameter is optional - if you leave it it will be automatically sorted in a alpha-numeric order. If this fits to your requirement you didn't need do more. But if not you may apply any numeric field as a sorting which might need to create in the script if you need any special ordering.
- Marcus
Ok, but if i write:
match(DES_REFERENTE, subfield(concat(distinct DES_REFERENTE, ',', ''), ',',1))
it not work, the dropdown list is blank
Optional parameter which aren't needed must be left out and not specified as empty string or NULL or similar. Therefore try:
match(DES_REFERENTE, subfield(concat(distinct DES_REFERENTE, ','), ',',1))
- Marcus
not work sorry, it is blank without values with this expression
Did you try to apply the expression within the listbox / combo box? That's the wrong place - at least like I understood your question which was that a certain value should be selected and not that this box contained just those single value.
If I understood it right this expression must be placed within an OnOpen action to select this value. Before this put this expression in a textbox to ensure that it returned your expected value.
- Marcus
ah i understand now, yes i had insert in a list box, so i will try to put in action in the sheet
ok i tried, but it not work sorry.
my listbox have the field: des_referente
i put in action of my sheet:
- select field: DES_REFERENTE
search string: match(DES_REFERENTE, subfield(concat(distinct DES_REFERENTE, ','), ',',1))