Hi All,
i have a PickerFieldUser, which am auto-populating, but the user can cancel the auto-populated value and key in other entry,
auto-populating the user field is working fine, how can i make the field null when the user takes out the auto-populated data and key in his data, below is my code,
item: a!pickerFieldUsers( label: "Requestor", labelPosition: "JUSTIFIED", maxSelections: 1, value: local!Applicant, saveinto: a!save(ri!Request_Inputs.Requestor,local!Applicant), required: true, validations: {} )
Thanks in advance
Discussion posts and replies are publicly visible
Hi - I think you're over-thinking this. If the default value is being supplied in the value of ri!Request_Inputs then your code should simply be this:
a!pickerFieldUsers( label: "Requestor", labelPosition: "JUSTIFIED", maxSelections: 1, value: ri!Request_Inputs.Requestor, saveinto: { ri!Request_Inputs.Requestor }, required: true, validations: {} )
this i tried Stewart , but its not working, as this field will be editable and user can remove the value present and add new value.
vineethk0001 said:i have a PickerFieldUser, which am auto-populating, but the user can cancel the auto-populated value and key in other entry,
That's what you said you wanted to do! Do you mean you want a default value added and that the User can only ADD to this value and only remove the values they have added but NOT remove the default User value?
No No, i want to have default value, if the user wants he can remove this default value and add his own value,
Ok, so I am confused. My original solution DOES satisfy your requirements. I tested it. So I don't understand why you then said:
vineethk0001 said:this i tried Stewart , but its not working, as this field will be editable and user can remove the value present and add new value.
...as this indicates that this is NOT what you wanted...please help me to understand what it is you want as it's not at all clear now.
Hi Stewart, my requirement is , on form load the "PickerFieldUser" will be populated with Default user(Logged in user), say "User1" will be populated, now the user who is filling the form can keep this "User1" or delete it and add "User2".
now whats happening is , on form load am able to populate "PickerFiledUser" with Defalut User(Logged in user),
but if the user wants to change this value and try to remove the default value to put "User2" into the field, its not leaving to do so, since as soon as i remove the defalut user, an event occurs by default (UNFOCUS or Keypress) which will again populate the "User1" into the field, not leaving me to key in "User2",
hope i was able to explain it properly
Ok. Assuming your form is being loaded in a User Input Task in a Process you can set the default value of the User being captured in the Task Activity Class variable (set to fn!loggedInUser()) so that your rule input has this value when the form is loaded. You can then let the User delete it and then select any other User they are allowed to select, saving the value to the same rule input.
sure, thanks a lot, will give this a try