Unique or first item

i cant get unique items or first item to work (or end in blue)

I have a RG. It should only show one item based on Title -so unique or first should give the same result but first item is propably the better option here.
Multiple items can have the same Title.

How do I end in blue?

When you do ‘Search for ContentPosts:first item’s Title’ it gives you back the first item on a list of texts and as your repeating groups Type of content is ContentPosts and not texts that is why it isn’t working.

I would change your search to ‘Search for ContentPosts’ to give the full list or ‘Search for ContentPosts:unique items’ for the list with just the unique items.

Hope that makes sense, let me know if you have any questions.

1 Like

Thanks alot for explaining :slight_smile:

I try this. but gives me all the items.

image

image

Ah ok I understand. If you only need the title then you can change the repeating group type of content to text and change the data source to ‘Search for ContentPosts:uniqueitems’s Title’

Otherwise using what you have above you can add a Title constraint within the search for content posts.

Edit: Making the repeating group to text worked but creating a new issue when sending data to the nex page.

Have not gotten it to work yet :frowning_face:

Should be simple though so don’t know why…

Got a group on the page: Type content = ContentPost
Got a repeating group inside group: type content = Search for contentposts (constraint: created by = current user)
Got a few texts in the repeating group. One of them is Title. There a multiple items in ContentPost with the same Title, so I only need to show each Title once. I have tried different ways but not found one that get me the result.

Ok then I see. You will need the original repeating group to be type ContentPost then add a ‘Title’ constraint to the search so that it only shows the unique elements.

Sorry it is hard to give advice without seeing your app.

This topic was automatically closed after 70 days. New replies are no longer allowed.