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
It would be a little tricky and depends on what the end game/goal is, but it sounds like you could possibly do the following -
I keep getting invalid calculate error. Basically I have 3 fields in play:
-my select one called Request_Status which has 3 selection options
-my username type called user_status
-my hidden field that stores the username called user_storage
on the hidden field called user_storage I'm running the following calculate: if(${Request_Status}='In_Progress', once(${user_status}),")
when I save my excel sheet I get the error mentioned above
Hey Joe, looks like within your if statement you have a double quotation instead of two single quotes.
if(${Request_Status}='In_Progress', once(${user_status}),") that should be two of these ' together.
If think if you change that up, then you should start to see some data following...
Cheers!
Mike
Error no longer exists but in testing it appears that my new field (user_status) which holds the username is changing if I login as a different user. I know this because I set this field to text for the meantime for testing
Hey Joe,
The question type "username" will change with every time a different person logs into the Survey123 form. However, if you are using the once() on the hidden field, then it will only pull this variable once the select one question equals the stated value. If you expose the hidden question and then change the value of the select one question a couple of times to different values, then the username should not change.
But it appears that this hidden field which I have exposed through a text type also changes to the current username.
Just to clarify I want this hidden field to hold the user name who sets the select one to in progress and "locks" this username into this hidden field. if I were to login as another user this hidden field should never change even if this 2nd user changes the select one to in progress as well.
Any ideas? Mike Bruening
Hey Joe,
The form that I created seemed to work in the manner that you wanted to have happen. That Form is on my laptop at home and I will take a look at it tonight once I get home. I wonder if you can put the entire calculation into another "once()" and it work?
Like something below.
once(if(${Request_Status}='In_Progress',once(${user_status}),"))
Hey Joe,
I tried to recreate this at lunch and it seems to work when you place the previous if() into a once() like I mentioned above. Let me know if that helped out and sorry for the delayed response as I have been very busy with some heavy-lifting on a few projects.
Mike