Difficulties linking data types in workflow and sorting in RG

Hello Bubblers, I need help with structuring my database and sorting categories in a repeating group and will be glad if anyone could help. In my App, I have a datatype for universities. The data type has fields such as scholarships, courses etc. each set up as a list. I have also created data types for the fields i.e. for scholarship, courses etc. and the data types have filed like: scholarship title, amount, course title, fees etc. The idea is, I want to list Universities in a repeating group so that when you click on each of the universities, it will take you to a page (current Page…) where you can view details about the university. From here, you can sort the scholarships, bachelor courses etc. offered by the university and view details about the scholarships, Bachelor courses etc. I want a possibility where you can, say sort only scholarships or courses in separate RGs on the same page i.e. Current page University…

I will appreciate help on the following:

  1. How do I save the scholarship, bachelor courses etc. fields as a list under University data type in workflow?

  2. How do I set the RG for each of the categories so that users can sort scholarships, courses etc offered by the current university in separate RGs?

  3. how do I set the RG to sort and list only courses or scholarships on a separate page and also provides info about the university which offers the scholarship or course?

Please find my data screenshot attached.

Hi. Let me give a stab at helping you forward with this.

  1. Yes, it is possible. What would this workflow be? How is the user triggering this workflow? I’m assuming the following:
    1. the user browses through the list of universities, clicks on one
    2. the users lands in the university detail page, selects some courses, etc.
    3. then the user clicks a button which activates the workflow

In that workflow, all you have to do is make change to a user and in the user’s parameter of list of courses add the courses you just selected.

  1. The way you have your data set up, it looks like you could have an RG where the data source is this university's courses and you can then add to that expression :filtered :sorted.

  2. What do you mean here? Is it something like:

    1. the user is at the university page
    2. clicks on a course
    3. that opens the course details
    4. in those details, you would like to show not only the details of the course, but also of the university?

If that’s the case, I would probably solve it like this:

  • in the university page, there is the RG with courses, the page has a state selected_course
  • when the user clicks a course, a workflow sets the clicked course in the selected_course state
  • the RG with courses has a condition that says it should NOT be visible when the selected_course state is not empty.
  • on the other hand, there is the course details group that is hidden. Until that selected_course state is not empty. It then becomes visible and it gets populated with the details of the selected_course.
  • when the user clicks outside on the X button on the course details group, a workflow sets the selected_course state to nothing which triggers everything in reverse.