AnsweredAssumed Answered

Replicating a Javascript Function on Mobile (A Puzzle!)

Question asked by rhia Champion on Apr 25, 2018
Latest reply on Apr 26, 2018 by cmikhaiel

Hey folks!


Once again I've hit the whole "javascript can't be used on mobile" conundrum. 


We have a javascript function on our desktop forms which acts like this:


1) A dropdown field with Accept, Reject, or Not Applicable is tied to an "initial" field to the right of it.

2) When the dropdown field is FIRST POPULATED or CHANGED, the "initial" field automatically populates with the Current User's name

3) This is hardcoded and the user can not change or remove this.

4) This means that, even after submitted / saved, if another user comes in and changes one of the dropdowns, it will then hardcode to THEIR username.



Thinking about it, I feel like there might be a very round-about-way to do this with rules inside of mobile. Like... if a user selects a dropdown (if not nullorempty and if username blank) then populate their name in the initial (then user CurrentUser to populate Initial).  


The problem I have is the next bit -- if a user saves, submits, etc, and another user opens it and changes it ....  best I can figure right now is that I need 2 fields. One for "written to field" after submission / save (which a workflow would pickup, clear out, and write)... and one to say "hey i'm empty because in this particular instance of this form being opened, no one has changed this attached field." 





I think it's an interesting problem likely with many ways to solve and thought it might be fun to think about together. Let me know what you think.