Using Multiple Criteria to pull & Sort Dynamic Data

Hi Everyone,

I have a 2-in-1 question.

  1. Is it possible to use 2 or more criteria to pull specific data from a parent form?

  2. Is there anyway to sort the data pulled using dynamic link before further processing it?

Example, Suppose. I have a primary form that let’s people book for appointments.

They are free to choose the primary health care centre they want along with date and time convenient for them.

The health care centres need to pull data relevant to them using their name & appointment dates as criteria and then further sort the bookings by time from the earliest to the latest.

Please any idea to go about these?

  1. Pull dynamic data using 2 or more criteria and
  2. Sort the data pulled in either ascending or descending order.

Thank you. Using

@elvis_pooplogg, try using the if-statement. That should help you solve your issue.


I’m just wondering how :thinking:

I’m a bit at a loss. If for instance i wish to pull all 85 patients that have chosen k-clinic on a particular date, do i say:

*instance(‘parentdata’)/root/data [clinicName = current ()/ …/myClinic]


instance(‘parentdata’)/root/data [apptmtDate = current ()/ …/xDate]*,

join(’ ', instance(‘parentdata’)/root/ data [clinicName = current ()/ …/myClinic/patientName),


Will something like this work with dynamic link to pull all patientNames or appointmentID’s , where clinicName = slected Clinic AND appointment Date = selected Date

And for sorting the appointments according to time, i’m still battling with the logic to use.

Thank you.