Updating and creating entities with one follow-up form

Currently your entity_id expression needs to explicitly generate an id in the create case. You can do this with an expression like if(${inspecteur_code_existant='', uuid(), ${inspecteur_code_existant}).

Another way to express this same idea is using the coalesce function: coalesce(${inspecteur_code_existant}, uuid())

I think you were getting at a similar idea with inspecteur_code but that is a user-provided code, not a system ID. You can have both but each entity must have a UUID as its entity_id.

Here's a similar example you may find helpful: https://docs.google.com/spreadsheets/d/1poe2lx_MUzbN0ySuZlRX8_fuKqM4LdsBMwKORQW1QRk I'll work to improve docs around this case.

4 Likes