I'm trying to generate a list of mobile numbe...

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

  • Classes - key, title, Related Registrations By Class * Students - name (is the key) * StudentToClass - _computedKey (appformula of CONCATENATE([Class],": ",[Student])), Class, Student, Related Registrations By Student

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โ€ฆ

0 4 323
4 REPLIES 4

#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โ€ฆ

Top Labels in this Space