Display different set of elements in different cells of the same repeating group, according to attributes of the current cell data


I am building a real estate listings app. I have “post” (data type) which contains posts with different “property types” (data field) like houses, land lots and offices.

I am displaying all this properties in a same repeating group with text boxes displaying attributes of the property like “total area” and “number of bathrooms”. However, since land lots have no “bathrooms” I need to say to bubble something like “when current cell property type=land lot, don’t display bathroom textbox”.

Basically, I need to display different element sets in different cells of the same repeating group but varying according to the type of property of each cell. How can I do this?

Note: I can’t create a new repeating group for each property type because the search is filtered using checkboxes, so the user can select more than one property type in the same search (ticking various checkboxes), which should be displayed in the same repeating group.

Thanks in advance!

Hi there, @pachocastillosr… you essentially constructed the conditional right there in your post. It should be as simple as adding a conditional to the bathroom text element that states When current cell’s property type is land lot, and then you would select the This element is visible option and leave it unchecked.

You could also go a different route and change the text that is displayed in the element based on that condition. So, instead of selecting the This element is visible option, you could select the Text option and display something different than the number of bathrooms in the element. If you went that route, you could avoid a bunch of hidden elements, although it could get weird from a UI perspective, depending on how you have things laid out.

Anyway, does that stuff make sense? Hope it helps.


1 Like

@mikeloc yes Mike it makes lot of sense! Hiding everything would work but it might result in a bunch of blank spots in some cells. I think that your suggestion of changing the text displayed solves everything. Thank you!

1 Like