Hi This is a workflow question. I am wanting...

expressions
(geoff gardener) #1

Hi This is a workflow question.

I am wanting to send SMS to client at set periods (1, 2,3,4,5,6,7,8,9,10,11,12 week periods) after [Appointment Date].

Expression: Today() = [Appointment Date] + 7

(then +14, +21 etc etc)

Unsure if this is working or not as not receiving test SMS messages, also, I have put my Twilio account details in, so not sure if its Twilio or Appsheet that’s the issue.

Does the expression seem right?

(Philip Garrett) #2

@geoff_gardener

I am uncertain I understand how you are going to handle the case when the client comes in repeatedly.

Ignoring that, I am going to assume that you have a “Client” table with a record per client. I assume that table has at least the following fields.

  1. A Yes/No field indicating whether follow up is needed.

  2. A Date field indicating when the client initiated the issue. 3. The client’s phone number.

You would create a single Report rule for the entire application that runs every day. The rule run against the “Client” table and specify the “For Each Row In Table” option. This causes the Report to examine each row in the Client table and potentially take an action on each row. You would write an expression that decides whether to send an SMS for each Client record. The expression would check the Yes/No field. It would also subtract the current date from the Date in the Client record, do a MOD by 7 on the result of the subtract, and check to see if the result of the MOD is zero. If so, it would send the SMS to the phone number in the Client record.

(Aleksi Alkio) #3

This formula will work basically only once and then it can’t be TRUE anymore. When you are using a scheduled report feature, you could write your formula like TODAY()<[Appointment Date]+13*7 and then trigger that report once in a week.

(Praveen Seshadri (AppSheet)) #4

To find out if the workflow rule fired, check its audit history. It will indicate if it successfully sent the message.

(geoff gardener) #5

@Aleksi_Alkio thank you. So the formula you wrote will trigger a weekly sms automatically?

(geoff gardener) #6

@praveen thanks…Didn’t think of looking here…

(Aleksi Alkio) #7

@geoff_gardener The formula won’t do that, the scheduled report will do that but with that formula you can control is that SMS triggered or not.

(geoff gardener) #8

@Aleksi_Alkio would it work if I had a seperate workflow rule for each time period? Or does it need to be scheduled?

(Aleksi Alkio) #9

It has to be scheduled if you don’t want to trigger them manually.

(Philip Garrett) #10

@Aleksi_Alkio

As Aleksi said, the easiest way to do this is to create a scheduled Report that is invoked on a weekly basis. You can pick the day of the week on which the Report is produced. For example, you could pick “Monday” or alternatively “Friday”.

(geoff gardener) #11

@Philip_Garrett_Appsh

@Aleksi_Alkio thanks for this.

I have had a look at the reports and I am slightly confused now.

If I am wanting to send SMS to client at set periods (1, 2,3,4,5,6,7,8,9,10,11,12 week periods) after [Appointment Date], but only if their appointment/case requires monitoring. How do I avoid the client, who may have several appointments during the above scheduled report, having another schedule of SMS being sent?

Ie: you come in today with a query (1) and I initiate the schedule of SMS , then you come back in next week with same query (1), how do ensure that the SMS process is not initiated again and then you have 2 sets of SMS being sent?