Hi,
I am developing my first App with AppSheet.
I created an โEnumListโ column that uses โRefโ as the โbase typeโ.
I tried to do as suggested in this topic: https://community.appsheet.com/t/is-it-possible-to-limit-number-of-options-cho/2789/2?u=neardj
but in my case it doesnโt work.
On โValid IFโ I have this formula: T_ROSA [ID_CICLIST] (which I use to retrieve the data for the EnumList) how can I also add the formula: COUNT ([_ THIS]) <= 8 ? (I want to limit max 8 choise)
Finally I wanted to ask you if you think it is possible that each value chosen by the EnumList goes on a new line instead of in a list delimited by a separator.
Thank you
Neardj
Solved! Go to Solution.
The fix I offered previously:
LIST()
+ SELECT(
T_ROSA[ID_CICLIST],
OR(
ISBLANK([_THISROW].[IDSQUADRA]),
([IDSQUADRA] = [_THISROW].[IDSQUADRA])
),
TRUE
)
Iโve not tried this, but it might work:
In Suggested values, use this:
T_ROSA[ID_CICLIST]
In Valid If, use this:
AND(
ISBLANK([_THIS] - T_ROSA[ID_CICLIST]),
(COUNT([_THIS]) <= 8)
)
Thank you for your reply.
Iโve tried it but donโt work.
I see this error:
Column Name โID_CICLISTAโ in Schema โT_INVIO_FORMAZIONE_Schemaโ of Column Type โEnumListโ has invalid โSuggested Valuesโ of โ=T_ROSA[ID_CICLISTA]โ. The type of the Suggested Values does not match the column type.
Make sure the ID_CICLISTA column is of type EnumList with base type Ref and source table of T_ROSA.
Yes. I attached you the screenshot.
ref|507x500
Please post a screenshot of the error message.
So there!
Weird!
What if you use this instead?
LIST() + T_ROSA[ID_CICLIST]
I tried. But with this formula I see all the values โโof the column and not only those of the reference item are filtered.
If I use T_ROSA [ID_CICLISTA] I only see the elements I need.
Sounds like you had been benefiting from the magic dependent dropdown feature. Complex Valid If expressions cannot be used with dependent dropdown, so weโll have to recreate the functionality, which is doable.
Try this as the Suggested values expression:
SELECT(
T_ROSA[ID_CICLIST],
OR(
ISBLANK([THISROW].[IDSQUADRA]),
([IDSQUADRA] = [_THISROW].[IDSQUADRA]
),
TRUE
)
I tried it. I have this error:
Expression โSELECT( T_ROSA[ID_CICLISTA], OR( ISBLANK([THISROW].[IDSQUADRA]), ([IDSQUADRA] = [_THISROW].[IDSQUADRA] ), TRUE )โ could not be parsed due to exception: Number of opened and closed parentheses does not match.
Try this, the extra ( is before [IDSQUADRA]
Thanks. I have tried it. Now I have this error:
Column Name โID_CICLISTAโ in Schema โT_INVIO_FORMAZIONE_Schemaโ of Column Type โEnumListโ has invalid โSuggested Valuesโ of โ=SELECT( T_ROSA[ID_CICLISTA], OR( ISBLANK([_THISROW].[IDSQUADRA]), [IDSQUADRA] = [_THISROW].[IDSQUADRA] ), TRUE )โ. The type of the Suggested Values does not match the column type.
The fix I offered previously:
LIST()
+ SELECT(
T_ROSA[ID_CICLIST],
OR(
ISBLANK([_THISROW].[IDSQUADRA]),
([IDSQUADRA] = [_THISROW].[IDSQUADRA])
),
TRUE
)
With this formula the error is:
Unable to find column โTHISROWโ
Whoops! That was a typo. Should be _THISROW
.
I just corret this. But the new error is:
Unable to find column โIDSQUADRA] [_THISROWโ
Ack! Another typo. Corrected above.
Now your formula is correct but the limit max 8 choise donโt work. Now I can see the items but I canโt select nothing.
On Valid If I have insert your suggestion:
AND(
ISBLANK([_THIS] - T_ROSA[ID_CICLISTA]),
(COUNT([_THIS]) <= 8)
)
@Steve your suggestion works if I change the โinput modeโ to โDropdownโ. If I use โbatteriesโ or โbuttonsโ the value is not colored. So it is not clear if it has been selected. Why?
@Steve Do you have an idea for this problem?
I donโt understand the problem. Please post a screenshot.
Iโm sorry.
I hope to make myself understood better with pictures.
Before inserting the changes you advised me when the user selected his choice, the button was colored blue:
After entering the changes you recommended, the screen looks like this:
The selected cyclist / button (1) turns dark black while the unselected cyclist (2) remains black. For the user it becomes really difficult to understand who has selected and who has not.
Even if I change the mode to โlightโ it changes little. The selected button becomes dark gray and the unselected one slightly lighter gray.
Do you think it could be a bug?
Yes, it looks like a bug to me.
Even with the unclear coloring, do the selections work as desired? Do multiple selections get saved to your spreadsheet?
Yes the selection work and I find the data on spreadsheet. How can I report the bug?
Send email to support@appsheet.com.
Thank you so much for your immense help.
Hi Steve,
sorry if i disturb you again.
If I wanted to add to the formula you suggested also the possibility of excluding from the list the cyclists who do not have an empty field in the T_ROSA table, in the โFINO_ALโ column, which formula should I add?
I tried to insert another condition to the โORโ function for example ISNOTBLANK ([_ THISROW]. [FINO_AL] but it doesnโt function.
Always thank you very much
Please start a new topic for this question and provide a complete description of the problem.
Wouldnโt the Suggest Values be the EnumLists not the items inside of it if you use T_ROSA[ID_CICLIST]? So the suggested values are EnumLists of References not References?
I use T_ROSA [ID_CICLISTA] because I only want to see some filtered values.
OH I misread, I thought your screenshot was the T_ROSA table. Is ID_CICLISTA the key for T_ROSA?
Yes it is.
@Steve I realized that by selecting โdropdownโ first I see the 30 cyclists of the selected team but after the last value I also see another 40 cyclists who are part of other teams not selected. With โbuttonsโ and โstack downโ it does not happen.
Hmmmโฆ Try unchecking Auto-complete other values in the EnumList columnโs configuration.
Thank you! Now I only see the cyclists of the selected team.
User | Count |
---|---|
36 | |
31 | |
30 | |
20 | |
17 |