Forum Documentation Showcase Pricing Learn more

Conditions on a list to be displayed in a repeating group

Hi,

I would like to create an app which allows users to display a list of universities. This list of universities will be used by the users to select certain universities in which they want to post an internship offer.
Before to display the list of universities, I want the users to fill input fields to indicate the dates of the internship. From that, the app will display the list of the universities which require the students to get an internship within the same timeframe.

I have created 2 date input fields, a button and a repeating group.

The button launches the search and make the repeating group visible.

In my database, I have following columns:
[Name of the university],[Beginning date for internship],[End date for internship]

I am wondering how I can make a search in my database to filter the universities by dates. For example, if the user fills the date input fields with “January 1st, 2016” and “March 15th, 2016”, I would like the app to display the list of all the universities which require their students to find an internship between these two dates.

  • Can you help me to design the correct workflow for that?
  • Also, how can I make each item of the repeating group clickable and selectable?

Hi,

The workflow here is would be when the button is clicked, display a list in the repeating group, and you design the search in the display list action. In this case, it should be quite simple, since you just need to have some constraints on the date, using the two inputs.

To make items clickable, you can have some events on the elements of the first cell (and you’ll be able to refer to the current cell’s item, like in the ‘voting app’ lesson). If you want to whole cell to be clickable, just use a transparent button on the top of the other elements in the first cell.

Hi,

Thanks for your reply. As you can see on the screenshot below, I have added constraints on the date, using the two inputs.

However, in the Preview, when I click on the main button “Voir les opportunités”, nothing happens.
Is the condition “Date début stage > Date input A’s value” correct? Does it mean that “Date début stage” is anterior to Date input A’s value?

I am thinking that you would be best off using a filter, rather than constraint.

Have you tried using the debugger to see how the list is calculated? Click on Inspect in run mode and click on the repeating group, you’ll be able to see how the list is evaluated. If you still have some issues then, let us know here and we’ll look in greater details.

I have tried using the debugger. The workflow is calculated in the right way:

It is weird: when I inspect the “group text” elements, I see that they contain the right text, but this text is not visible on the page:


Above, in the selected cell, I find “Paris-Dauphine” with the Debugger (which is the expected university name), but nothing appear on the page.

That was an issue with your design, your text element in the first cell was too small, so in edit mode it was showing ‘…’ and in run mode we make it so that it shows nothing. Be careful with … when you’re editing texts, they’ll be hidden in run mode.

Should be fine now, made the text bigger.