pulldata("@property", 'online') Snapshot

761
4
Jump to solution
05-17-2022 11:33 AM
KyleHeulitt2
New Contributor II

The function pulldata("@property", 'online') returns 'true' if the device is connected to the internet and 'false' if it is not.  The default behavior is that the value updates as the network connectivity of the device changes.  Is there a way to have it retain the value from one moment in time?  I have a repeat with questions that pull data from a feature service and I want to retain the 'online' boolean value that represents network connectivity at the moment the data is pulled from the feature service.  I haven't been able to figure out a way to do that.  I tried the once() function but that didn't seem to work.  Thanks in advance for any suggestions!

0 Kudos
1 Solution

Accepted Solutions
JenniferAcunto
Esri Regular Contributor

I think wrapping your calculation in once is the way to go, but you will probably need to add a relevant statement to control when it is fired. I would use the string length of the first question that pulls from the feature service to grab the online status as you're pulling from the feature service.

2022-05-19_7-56-26.png

- Jen

View solution in original post

4 Replies
ZacharySutherby
Esri Regular Contributor

Hello @KyleHeulitt2

You can set the calculationMode to manual and that will control when the calculation is updated. Please see this documentation for more information. 

Thank you,
Zach
KyleHeulitt2
New Contributor II

Thank you for the quick reply, @ZacharySutherby, and for making me aware of this functionality!  Unfortunately it doesn't seem to resolve my current problem.  Although setting the calculationMode to manual does add the Calculate button, the calculation is behaving the same way it did previously and updates automatically when internet connectivity status changes.  Perhaps this functionality/parameter isn't able to handle device properties as it does other calculations?  I did update to the current version of Connnect (3.14.274), and I tested in both Connect and the Field App and saw the same behavior in both.  Please let me know if you have any additional thoughts or suggestions.

Thanks Again!

Kyle

0 Kudos
JenniferAcunto
Esri Regular Contributor

I think wrapping your calculation in once is the way to go, but you will probably need to add a relevant statement to control when it is fired. I would use the string length of the first question that pulls from the feature service to grab the online status as you're pulling from the feature service.

2022-05-19_7-56-26.png

- Jen
KyleHeulitt2
New Contributor II

Thank Jennifer!  This seems to be working!  I had tried something similar before but had built the string-length conditional into the calculation using an if statement.  That didn't seem to work, but it's possible I may have had some error in my calculation.  Thanks for the assist!

Kyle

0 Kudos