Smartforms - Clearing a Picker Field

I have a situation where I wanted to clear a picker field if the entry did not have a valid value in the Picker Field. This is how I did it. If anybody has a tidier solution that would also be good.


In the 'When Picker is resolving' Rule. I added the following.


When Picker is Resolving

also populate Picker list control with data (Configure)

 If Picker contains a value

    then set the properties of the checkbox control     ' I use this just as a visual verification check on the form.


 If Picker does not contain a value

    the complete the following one after another

        then set the properties of checkbox control (configure)      - DeSelect the checkbox visual verification check box and set a label No account found.

        then set the properties of picker control                                 - I clear the watermark otherwise it puts it under the text of the username.

        then populate Picker list control with data (configure)         - I set the Account value of my Picker to 'Try again.' I think any text would work.



What it effectively does is wipe the incorrect Account Name from the Picker field and puts an insertion point for the client to reenter an appropriate account name.

I realise this might be a bit of a fundge, but it seems to work.



0 Kudos
2 Replies
Nintex Employee
Nintex Employee

Re: Smartforms - Clearing a Picker Field



You can use the "clear" method instead. This method is designed to clear controls.


Your rule construction will look like this:


When Button is clicked

   then execute the Clear method (configure)        **configuration - in the output mapping select the checkbox of the controls you would like to clear.


Now run the viewform and type some value in the picker control andor the other controls you specified that should be cleared as well, notice that when you click on the button that the clear method is configured to the specified controls would be cleared to the state that they were in when the viewform was first started.


Kind Regards,



Re: Smartforms - Clearing a Picker Field

I executed the picker control's load method with the original smart object value configured for the required input.  I couldn't leave it blank, but if the smart object value is blank, it clears the control.  It's not a solution in all circumstances, but I think it will work for most without clearing the whole view.

0 Kudos