Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I can't seem to get this to work...
I just need an input box to set a value for a variable, but want to constain the possible values to what is stored in a particular field (a drop-down list would be the best).
Any pointers?
TIA
--
bob
hi,
create the input box. Go to the Properties->Constraints tab of the input box. Highlight yourfield. In t ebottom rght hand corner of the screen click on "predefined Values in Drop-down" and "Listed Values". In the Expression box under Listed Values enter an expresson such as this:
=concat(distinct YourFieldHere),';')
this will create a semi colon delimited list o fthe values form the field you wish to use. This is te format required for te contsraints in an input box.
try it and see.
Hi,
I have tried this before...But the dropdown lists the values in a single row like Value1;Value2;Value3
Almost!....
The problem is the values are text, and the requirement for text as listed values is that they must be enclosed by single quotes.
I tried using the string operator '&' with the chr(39) text function to add a single quote at the start & end of the expression, but that's still not enough, as it really needs the quotes surrounding the semicolon as well....
Hi,
The above works fine here. What values are you using and what expression? Have you tried creating a new inputbox and not modifying the existing one?
Regards.
BI Consultant
Hi Miguel,
Can you post the sample application for this
hi,
could you post an example?
just retested here and on a text field I did exactly as specified and it worked. Tried with another textfield having strings with spaces in them and it worked too.
I definitely don't think the semi colons [;] need placing inside quotes
from the help I can see this:
Listed Values | Check this alternative to specify a list of arbitrary predefined values. The values can be either numeric or alphanumeric. Alphanumeric values must be enclosed in quotes (e.g. 'abc' ). Each value is separated by a semicolon ( ; ) (e.g. 'abc';45;14.3;'xyz' ). This option can be used alone or in combination with Number series. |
and I imagine thsi is what you are referring too. But I have the feeling the concat() expression gets around this.
I am missing something?
pat.agen and Miguel,
The field that I want the predefined values holds dates in the format of YYYY-MM-DD, as follows:
The expression I used is therefore:
=concat(distinct TransacDate,';')
The result that I get is:
hi,
then format it with Date()
=concat(distinct Date(Timestamp,'AAAA-MM-DD'),';')
No joy....
I have tried
=concat(distinct date(TransacDate,'YYYY-MM-DD'),';')
and also
=concat(distinct date#(TransacDate,'YYYY-MM-DD'),';')
... the results are the same as depicted above.