Display default text "N/A" when field is empty

Hi All - I’ve searched around but can’t seem to find an answer to this:

In a repeating group, how can you display some text (like “N/A”) when the field is empty?

I’ve tried adding a conditional statement that converts to text and checks if it is empty, but it’s not working:
image

image

Thanks for any advice!

If you remove the format as text part then it would work.

“Current row’s owner_requirer_join’s owner_name is empty”

2 Likes

Thanks! So since it’s a Repeating Group, I’d have to put “each item is empty”, but that throws an error, I believe because it resolves to a Yes/No list rather than a single value:

image

Thoughts?

That shouldn’t be a problem. Where are you setting this?

1 Like

I’m setting it as a condition on the RG:
image

I think the problem may be that even though it is “current row” it is a List of texts, rather than a single text?

Yes that is a problem (it being a list of texts) and not just because of the N/A problem.

Sorry code-escapee, I’m not sure I follow: is it not normally a list of texts for a RG? The actual field is just a text field, so I assumed it’s evaluating to a “list of texts” purely because it is a RG. Is that right?

It’s not a problem for the display in general, everything is displaying fine, I’m just not able to create this conditional.

Thanks for your advice!

The RG should usually be a list of a Data Type from your database, not something simple like a text or number. Then within the cell of the RG you would place a Group and have the Source of the Group be Current Cell’s Thing. Then the conditional is on the Group or the Text elements/Input elements within the Group. Like in your screenshot, the conditional is on a text element and not on an RG like you said, so it is a little confusing as to what you are doing or how your RG is set up. It appears you are saying that an onwer_requirer_join has a field called owner_name and that is a list of texts instead of just a single text. That seems a little odd but if it works for you then just change the Conditional to “Current row’s owner_requirer_join’s owner_name :first item is empty” and set the Text to “N/A”.

2 Likes

Yep @darin needs to check current cell’s owner requirer

1 Like

Thanks @williamtisdale and @rohanjainneri -

  • So the element in the screenshot above is a Text object inside the RG (it’s actually a Table, but I believe that acts the same as a RG).
  • The Table/RG is set up with the data source being a Data type, as @williamtisdale suggested (in this case owner_requirer_join records)
  • The Text element then calls the current row’s owner_requirer_join’s owner_name, which unfortunately is coming in as a list of text rather than a single text, which it sounds like is causing the issue
  • I tried changing the conditional to @williamtisdale 's suggestion of “Current row’s owner_requirer_join’s owner_name :first item is empty”, but for some reason that isn’t working either - how odd!

Here’s a question that may shed light: is the “list” a list in each row, or by “list” is it referring to the whole RG?

@williamtisdale I wonder if this could be part of the issue: for our back-end database we are pulling from AirTable, and I was just checking the Schema and under “List of Records?” I have “No” selected:

Could that be causing the issue?