Store Username as a Static Value

1489
23
07-15-2019 02:02 PM
joerodmey
MVP Alum

I want to capture the username at specific times (Ex: when a user clicks a radio button) but it appears the username is always captured regardless of if its in a relavant based on a radio button. I also cant store it in a variable without it changing.

Any ideas?

thanks

0 Kudos
23 Replies
by Anonymous User
Not applicable

Interesting that everything is being ran through the webform and that you are having the calculation issue. I do know that there are differences between the webform and the field app and how they apply calculations. Unfortunately, I do not utilize the webforms nearly as much as I do the field app. I do know that within the Survey123 website under the "settings" tab, that you can choose which version of the webform that is used. I am guessing that it is within here that you have locked it down to use the 3.0 version it was published with?

As you can see I used a BETA install to post my form as 3.5 is the current publicly available version, but 3.6 is the current BETA version. I wonder if you could potentially build a survey form within the more recent version of connect and then create a form from your existing feature service to complete a test?

During the install of Connect, you can redirect which folder the install is applied to and it will not overwrite or remove your current version of connect. You could achieve this by adding a suffix to the folder name during the install; something like"_v3_5". This would allow you to rebuild and test a new form using the current data within your HFS. I have done this before and it seemed to work.

It sounds to me that you would want to possibly have two fields that would capture the information you are looking for; the first initial setting of the "In Progress" and then a second for whomever is currently working on the form and setting it to "in progress" by not using the "Once()" around the calculation.

If you have the webform locked into the 3.0 version, then this could be why the calculation is not working correctly as you are telling the webform to not use the current coding. If you are using the current webform version, then it could be that this type of calculation is not supported.

0 Kudos
joerodmey
MVP Alum

Yes it defaulted to the 3.0 version webform. 

Do you think its a version issue or with logic? Is it even possible to run the once function on 2 separate occasions? Can I just use some form of if statement to check if the field is filled in with text (the username). If its filled then do the comparison. Or instead use editor tracking to check last edit person? I would have the initial edit person pushed in via URL.

0 Kudos
by Anonymous User
Not applicable

I was thinking of suggesting the "Editor" from the AGO tracking, but I wasn't sure if that would be suffice for your needs. I think the if() would have to be a dynamic one.

I wonder instead of trying to do it within the form if you could do it through a REST service call in comparing the original once() command username value to the current username of the submitter? If they equal, then no action. If they are unequal, then insert username? It's not within the form, but you wouldn't have to update to the latest version. You would have to query the previous data using a REST call in order to do the comparison between the two?

0 Kudos
joerodmey
MVP Alum

So far Ive been testing with the editor tracking aspect of the feature service and seems to accomplish what i'm looking for. Will report back once testing is complete