From Field Maps and a webhook I can pass the Global ID to a RELGlobalID like so
field:REL_GLOBALID={GLOBALID}&
href="arcgis-survey123://?itemID=cb33fc9a37xxx440146&field:REL_GLOBALID={GLOBALID}&callback=https://fieldmaps.arcgis.app" rel="nofollow ugc" target="_blank">Add Form</a>
But Im curious how to pass the Current Date to a date field and the logged in user to a username field
1. Can I use the NOW to denote existing date and time?
field:SomeDateFiled={NOW};
2. What about the logged in user?
field:UserName={username};
Solved! Go to Solution.
Got the date with this
field:DATETIME={NOW()}&
Now just need the logged in Username
I tried the below with no success
field:UserName={username};
field:UserName={theusername};
Does the username have to come from the map? Or can it come from the username of the Survey123 form? If it can come from the form, then you can just add a row to the form with a "username" field type.
No there is no username in the Field Maps data itself... I was trying to push the logged in user from Field Maps into a field value in Survey123... if possible
I literally just had this come up yesterday. Unfortunately, I haven't been able to find a way to pass the username to S123.
I assume I have the same setup as you: web map which requires users log in/authenticate to use (in my case, using SSO), then pass that information into S123.
If someone has a solution, it would be appreciated.
The arcade code for this can be picky. See if this post helps https://community.esri.com/t5/arcgis-field-maps-questions/get-logged-in-username/m-p/1267104
There is also a field type of username that can do it for you in 123.
In Survey123:
I don't think this will work exactly, at least for me. I am thinking Viewer Accounts within a web map. So, more like extract that username, and pass a name into a text field in S123.
Didnt think of that.. as they would have to be logged into S123 as well... I think this will work... going to test ... THANKS