A way to determine if the user is connected to the network?

Hi,I just wondered if anyone knows of a way to see ‘if a user is connected to the network’?

For instance, I have an agent which uses formula language.

It essentially sets an environment variable to a path which eventually gets used to store an attachment and then upload to a seperate system.

But, sometimes the user is not connected, how can I build this in? I have a different path to use for ‘purely local’ environments?