What is the purpose of Error when empty in export mapping

0
I'm trying to understand the purpose of the 'Error when empty' option during export through associations or microflows. I've attached some images to provide context. I have a library object associated with a books object and members object. I've added details for library1, library2, and library3, where library2 has a book and member, and library3 has no book or member. When I select 'Error when empty' in the mapping, I expect to encounter an error when accessing the library REST endpoint. However, I still receive the library3 JSON output, despite having no book or member. Could you please clarify whether there's a specific purpose behind 'Error when empty' in Export Mapping or if I'm misunderstanding something?                      
asked
1 answers
0

Hi Varsh,

As far as I know,

The "Error when empty" option in Mendix’s Export Mapping is meant to stop the export if a specific part of the data is missing. But in your case, Library3 is still getting exported even though it has no Books or Members. Here’s why:

Even though the Books and Members associations are empty, the Library itself isn’t. Mendix sees that there’s still a Library object with a Name and Location, so it exports it anyway. The "Error when empty" setting applies only to specific fields (like Books and Members), not to the whole Library entity.

Hope it helps!!

answered