As you can see for “John Rae” for today (06/03/2024) the returned value is “English , Science” which is the value of [Courses] from the previous week. Yet this does not set the [Courses] for today when used as the initial value.
I even tried simply setting the initial value to be LIST(“English”,“Science”) and still the EnumList was not set.
I thought it was maybe the fact that the Editable formula was preventing an initial value, but I tried removing it and still it’s not working.
Not sure if this will solve your problem, but there are some issues when using SELECT() of an EnumList column, because it quasi returns a list of lists. So try the following to see if it works correctly:
@Markus_Malessa thank you for the suggestion: I think I tried that earlier but, nevertheless, I tried it again and there’s no difference: there’s still no initial value.
I’m more concerned that I can’t even get an initial value if I simply just specify it manually asa list, i.e.
LIST("English","Science")
Didn’t work either, so I’m confused about what is acceptable as an initial value.
As @scott192 pointed out, pay particular detail to your separator for your enumlist. The default I think is " , " (space comma space). Just for additional testing see if you can preset the initial value like this:
If my memory serves me right, I think @Marc_Dillon had made this nice suggestion of using TEXT() first before using SPLIT() as use of only SPLIT() fails at times. I will post his recommendation post , if I can find it on search. I had found his recommendation very useful and it always works.
Also I believe the “flatten the list of lists” term was used by @Steve first. It is so appropriate for the case.
Yes, always use the TEXT() first. This makes sure to retain the standard space-comma-space delimiter, which you can then SPLIT() by. Using just SPLIT by itself tries to use a different delimiter, which can work in some cases, but it also produces erratic behavior in some other cases.
Add the - LIST() to the formula of your interesting response…this will remove the empties. Edit* You may have to wrap the intial part of the formula in a LIST() expression first.
Sorry there was some part missing in my earlier suggestion, that I had corrected in the same post. Please note a “,” at the end of the expression that needs to be there.
I think I have found the issue and it’s nothing to do with any of the formulas: I’m trying to edit an existing row, rather than making an entirely new row: I didn’t realise that if it’s a pre-existing row and you edit/quick edit from a detail view then even if the column is empty you don’t get the initial value.
I need to take a different approach, e.g. use a bot to set the values when the row gets created.
I’m disappointed that support has not spotted any of this in our interaction that I’m trying to do something that AppSheet cannot do (yes I can set the “Reset on edit?” option, but I don’t want that if there’s actual data there).
Thanks for all the suggestions as they will be useful in the future.
You could put a formula on the column’s Reset on Edit section so that if you make any changes to the row and the current value of your enumlist is empty then it will fill in the initial value again?
Can you clarify why you are trying to edit an existing row? Or are you using copy the current row into a new form functionality? If this is a new attendance row under a student for example I am unclear why editing a current row would be necessary.