Missing Entity ID with form that can create or update Entities

It looks like there is no Entity id generated when the create_if condition is true. On the Entities sheet, the entity_id is set to ${ouvrage_suivi}. That's an Entity selection field with a relevance condition of ${action} = 'suivi' or ${action} = 'modification'.

You might think there's a fallback to a UUID in case the entity_id value is blank but that's not currently the case -- you're responsible for making sure that the entity_id reference is always set in the way you want it.

In your case, you can change the entity_id expression to coalesce(${ouvrage_suivi}, uuid()). This uses ${ouvrage_suivi} if it has a value or generates a new uuid otherwise. Another way to write the same thing is if(${ouvrage_suivi} != '', ${ouvrage_suivi}, uuid()).

We have the following docs on this:

Maybe we should add a troubleshooting section that specifically calls this out? It's not very intuitive so I'd love any suggestions you have for improvement. I do think it's probably something Collect should detect and at least warn about as well.