Select to view content in your preferred language

Is it Possible to use the pulldata() Function while Offline for Email Addresses

518
1
01-22-2024 05:14 AM
JamesUnderwood
New Contributor

I created a survey last year to allow our safety inspectors to perform their inspections more easily. Part of that was using the pulldata("@property") function to pull the userFullName and email items into the survey without them needing to fill them in manually.

Another part of my workflow is I have automation set up to create reports that are emailed to the inspector and their direct supervisor, as well as having the reports stored in a google drive. The process works well enough if the device is online, in which case everything goes off without a hitch. However, in the event that the device is offline, the pulldata items listed above don't populate, and instead return no values. When that happens, it completely breaks the Make webhook workflow since it's not possible to send an email to a non-existent email address. This stops everything and I have to manually go into the google drive, email the report to the inspector, then delete the failed record from the webhook queue to fix the issue. This can take a lot of time and cause me a lot of random headaches throughout my day.

To my question, does this information not get stored on the device and instead requires an active connection to our portal? Is it possible to pull this data while the device is offline? If it's not possible, is there another workflow that I could potentially try? I was thinking about using a filter and choice lists so that the inspectors could only pick their name and email based on the district they are in, since each is assigned one, but was told that sometimes they may inspect field crews, etc, from other districts that may be working in their areas.

1 Reply
abureaux
MVP Frequent Contributor

I had a similar issue since I had the Inbox keyed to the username field. But, as you mentioned, as soon as the user goes offline, they are logged out (and those fields are empty).

Having offline users stay logged in would be amazing... sounds like an enhancement idea there.

But for now, what I have done is added a few fields to my surveys to support always having a value for 1) the Inbox, and 2) emails for flows. In the example below, that field would be "username_email_h".

abureaux_1-1705952309441.png

Scenario 1: User is logged in
Their username gets dumped into "username_email1", which then automatically populates the dropdown "gn_assessor" (meaning they don't get stopped by the required component), and "username_email_h" gets the final result. In this scenario, no user input is required.

abureaux_2-1705952967288.png

Scenario 2: User is NOT logged in

They are required to make a selection from the dropdown. That populates the dropdown and "username_email2" which is then dumped into "username_email_h". In this scenario, they need to make one selection.

abureaux_4-1705953047810.png

Scenario 3: User wants a different tech in the "username" field

You may not need to worry about this, but it is something that I needed to cover off. In this case, regardless if they are logged in to not, they select who they want from the drop-down and that overrides the default username in "username_email_h"

abureaux_3-1705953020506.png

EDIT: Since it isn't entirely obvious, I have  CSV with user details (EM8) which is what "username_email2" is pulling from.