Appsheet API refuses to edit a row with an Enumlist

Hi Dear Community,

I wish I was able to PM @lizlynch but it seems I can’t in the new Community platform, so I write here instead :slight_smile:

I encountered a bug wich is not solved, and I tried two tickets for the same situation, on two differents apps specifically to isolate the issue - which could be reproduced easily.

Tickets:

[3-4426000038455]

[3-0443000039568]

Basically, the AppSheet API is used to update an enumList column with an urlFetchApp Apps Script function.

The specifics of this situation is that this enumList column has a valid_if condition.

  • Case1: EnumList column receives one item only ==> gets written correctly
  • Case2: EnumList column receives one other item only ==> gets written correctly
  • Case3: Enumlist column receives these two items together ==> nothing gets written

Is it possible to get in touch with someone from the staff willing to solve this situation?

Many thanks in advance to anyone able to help or escalate this issue!

3 Likes

@Aurelien - Thank you for notifying us! I’m passing this issue on to the team. Apologies for the inconvenience with trying to get this resolved.

3 Likes

OK, thanks.

I have a sample app, a sample script, and Google Docs explaining how to reproduce everything step by step.

Feel free to PM me so I can provide all necessary information to the good person.

2 Likes

If you shared it through the support tickets, they might have the information they need, but will keep you posted! And thank you!

2 Likes

Thanks to @Suvrutt_Gurjar ‘s kind help, here is the solution!

The valid_if needs to be ignored when not using directly the app.

Hence, if my usual valid_if expression was, for example:

Items[Item ID]

It should include:

CONTEXT(“Host”)<>“Server”

Hence, it would become, for example:

IF(CONTEXT("Host")<>"Server",
  IN([_THIS],Items[Item ID]),
  TRUE
)

Or, equivalently:

OR(
  CONTEXT("Host")="Server",
  IN([_THIS],Items[Item ID])
)

Note: I inserted IN([_THIS], …) because an IF() expression requires the same type in its two output arguments.

However, this is a workaround, and from my perspective it still is a bug that should be fixed by AppSheet Dev team.

3 Likes

You are welcome @Aurelien .

Nice to know the suggested approach works for you as a workaround.
Yes, a permanent way out to disregard “valid_if” during automation, if so required will be great.

2 Likes

This?

IF(
  ("Server" <> CONTEXT("Host")),
  Items[Item ID],
  [_THIS]
)
2 Likes

It may work as well, thank you @Steve!

2 Likes