Help with a simple formula!
I need help with a button!
The purpose of the button is to notify a family member to check their email for a photo we sent to their child’s primary physician with an update.
All of the fields are working - except the primary physician.
A child might have several physicians (specialists) but only one will be the primary. That physician is marked as the primary via a button. (screenshot attached)
I just want to be able to send test message that says:
“Hello (parent), please check your mailbox for a photo of (patient) that we sent to (PRIMARY PHYSICIAN) with an update.”
I’ve tried all manner of formulas to get this to sort but without success. As with nearly every question I submit here, I know that the answer is simple puts my lack of basic skills on display.
Here is the formula I am using now, which returns (of course) the names of all physicians associated with the patient:
openURL("sms:" + 'Guardian 01 Phone 1' + "&body=" + "Hello" + " " + 'Guardian 01 First Name' + "," + " " + "this is Pete from BrightStart Pediatrics. Check your email for a recent photo of" + " " + 'Patient First Name' + " " + "that we sent to Dr." + " " + 'Physicians and associated practices'.Contact.'Last Name' + " " + "with an update.”)
Here is a screenshot of that formula build, if it is helpful in understand how I’m missing the obvious.
Can anyone assist me with this?
Replace your highlighted code in the screenshot with
first('Physicians and associated practices'['Primary Physician' = true]).Contact.'Last Name'
- first() grabs one record, as there are multiple records in the "link from" table/field
- the square brackets filter the multiple results where 'Primary Physician' is checked "true".
- Once that record has been found, outside of the first(), we can then grab the contact.Last Name