I have a form that shows contact details at a glance. In that form I have a section that shows family members. I have a single text display box that has all the fields I need. I have checked the collapse empty lines.
The DB allows for 3 children entries. For each child there are three fields (Children01FN, Children01LN and Children01DOB. My formula is as follows:
I took your code and modified it, e.g. shortened the field / variable names from Children to “Ch”. The 1st line checks if a first child exists. The Lines 2 and 3 check if there exists a child 02 or a child 03. If not they replace the formula with an empty string. — You might still have to take care of situations where a child exists whose name you know but not the date of birth. You certainly do not want to read this child to be 2023 years old.
I couldn’t get the sandwich( function to work. It still left the dates showing (there is a " missing, which I corrected).
@KJM solution worked perfectly, even when there where no children at all for a record.
I’ve really been enjoying using PanX. I’m building a church database, that’s a culmination of Ninox and spreadsheets. So far so good. The only challenge is when you don’t know what function will do what you need and this forum certainly comes to the rescue!
For the concatenation of the names the yoke function is better than the sandwich function. If you concatenate two empty name fields, sandwich results in the connecting “root” character; yoke’s result is an empty string.