sounds like it would be simpler to use a portal to list the items with a portal filter to omit those where that field is empty.
Your if function won't work because it will only "look" at the first related record and then either returns a list of values or not depending on whether the field in that first related record is empty.
You'd need to use the list function with a relationship that won't match to the records you want to omit or to list a calculation field in the related table that is empty when this other field is empty.
You could also use the ExecuteSQL function to produce this list with a WHERE clause that will omit the records where this field is empty.
Hi, thanks for the reply. I would normally just put the portal on the layout and filter it, which I have on other layouts. But I was looking for a way to make a list for a related record this way because it needs to go on a form where I don't have room to put a portal. I need the results to appear on one line. I will look at other ways to work around this. Thanks again.
To take a return separated list and produce a horizontal line of values, use substitute to replace the return character with some other delimiter such as a comma or space:
Substitute ( YourFieldHere ; ¶ ; ", " )
Though if you use ExecuteSQL, you can simply specify the comma as your record separator in the first place.