Iโm trying to generate a list of mobile number to send an SMS via the Send Message Workflow, but I canโt seem to get the query workingโฆ
There are 3 tables involved
The computed key provides restrictions so that the system will not allow the same student to be registered for the same class twice.
Iโve tried several directions for getting the information by interrogating the tables in different waysโฆ but nothing seems to work. i.e.
From Students
SELECT(Students[Mobile], IN(โsomeClassIDโ, [Related Registrations By Student]))
From StudentToClass
SELECT(Student[Mobile], [Class]=โsomeClassIDโ)
One primary issue is that the Workflow TO field is not attached to the Expression Builder, so itโs difficult to build elsewhere and move overโฆ
Thoughts, suggestions?
Thanks in advance allโฆ
#SOLVED
StudentToClass table must have proper Ref columns; one referring to Students table (e.g. [StudentRef]), and another referring to Class table. 2) In StudentToClass table create a Virtual Column e.g. [StudentMobile], with this formula: [StudentRef].[StudentMobile] โ assuming there is such column as [StudentMobile] in Students table.
If you have above in place, then you can have a SELECT on StudentToClass table that makes a list of the Virtual Column for a particular class; something like this:
SELECT(StudentToClass[StudentMobile], [Class]=โClassIDโ)
@RezaRaoofi Very niceโฆ i had not thought about the VTโฆ
Soโฆ Im not sure if this is a work around, or the right answerโฆ butโฆ itโs workingโฆ
SELECT(Students[Mobile], CONTAINS([Related Registrations By Student], LOOKUP([SendTo], โClassesโ, โTitleโ, โkeyโ)))
This is the query that I put in to the TO field of the workflowโฆ itโs works perfectlyโฆ
User | Count |
---|---|
35 | |
35 | |
28 | |
23 | |
18 |