Combobox and dependencies

Combobox and dependencies

Hi there,

I would like to create e an dependency between several comboboxes.
In this case (see for a print screen the attachment) I chose for combobox Verwijsbrief a client who receives physical therapy (Verwijsbrief is actually the dossier of therapy, ie physical, speech or occupational therapy).

Questioin 1
I would like to chose from the combobox only the physical therapists. I've seen some examples in the forums, but I'm using an output structure that makes it possible to show multiple fields in the combobox, but in that example I wasn't able to make the connection to the previous combobox.

Question 2
Another requirement would be that as a default value the user id of the therapist that has been logged in would be shown.   -> for this instance this would be the better choice; however in other screens I am using comboboxes that depend on eachother. Therfore I at least must have a solution for the first question.

Edited by André Vieira on request of user to remove attachment.
For Question 1, you should edit GetTherapeutNaam to filter by speciality. It  doesn't matter if it combines several sources (is it what you're asking here?). If only a certain type of therapists are selected, ony those are shown.

Question 2: On preparation of the screen, assign the desired default value to InvoiceLineEdit.Record.InvoiceLine.TherapeutId. If the user is logged in I would say it is Session.UserId, but I don't know how you made it.
Sorry for the late response.

For question 1 I assume I have to make some changes in the advanced query, by setting up a filter. However this filter has to depend on the value of the attribute discipline in [Verwijsbrief].

I've mentioned the sql statement of GetTherapeutNaam below.
The outcome of this query should be for example, that all physical therapists are shown because they have the same discipline as mentioned in Verwijsbrief.discipline.

Where do I have to make the adjustment(s)?


SELECT {Therapeut}.[Id], {Therapeut}.[Voornaam] + ' ' + {Therapeut}.[Tussenvoegsel] + ' ' + {Therapeut}.[Achternaam] + ' - ' + {Therapeut}.[Discipline]
FROM {Therapeut}
WHERE {Therapeut}.[TherapeutActief] = 'Yes'