cancel
Showing results for 
Search instead for 
Did you mean: 
nps9
Nintex Newbie

set value of singleline and save the form

Jump to solution

I would like to use a button to set the value of a single line text box (txtCurrentStatus) and then save the form. I have looked at some other questions on the community site but nothing seems to be working for me. I have set the client ID in the text box properties (idCurrStatus) and verified my function is being called with an alert function before and after my line to set the textbox value but the value never changes.

in form settings custom javascript I have:

function SetStatus () { 
   NWF$('#' + idCurrStatus).val("Approved"); 
}

button client click I have:

SetStatus()

(cause validation is no)

single line txtCurrStatus:

client ID is yes

value is idCurrStatus

After the form refreshes the value hasn't changed and the form hasn't saved. I have read two other post that are similar and neither seem to be working for me.

Labels: (2)
Tags (1)
0 Kudos
Reply
7 Replies
praios81
Nintex Newbie

Re: set value of singleline and save the form

Jump to solution

Hey John,

you should be able to do this without JavaScript.

Open the settings of your button and go to the Advanced section.

There, set Connected to to your single line column.

Set Value returned to the value, you want to save once the button is hit.

Hope this helps.

Kind regards

Enrico

0 Kudos
Reply
nps9
Nintex Newbie

Re: set value of singleline and save the form

Jump to solution

Thank you for the repy Enrico!

I have tried that and it just doesn't change the value after the button is pressed.

connectedTo example

The button action is set to Save and Submit.

0 Kudos
Reply
nps9
Nintex Newbie

Re: set value of singleline and save the form

Jump to solution

I created a new list and it worked exactly as you said. I am not sure what my existing list has in it that is causing the problem but I will work my way through it. Thank you Enrico!

Reply
nps9
Nintex Newbie

Re: set value of singleline and save the form

Jump to solution

I think I have found the issue and I would say it's a bug. If you move the field that you've connected the button or buttons to then it breaks that connection. If you move the field or textbox back to it's original position then the connection to works again.

Reply
praios81
Nintex Newbie

Re: set value of singleline and save the form

Jump to solution

Oh wow, that inded sounds like a bug. That functionality in general should be independent of the button's position.

0 Kudos
Reply
Automation Master
Automation Master

Re: set value of singleline and save the form

Jump to solution

That's very strange indeed. Please email support that occurrence so they can track that possible issue. 

Thank you so much for sharing your experience though and the way to avoid it. It will be very helpful to others!

0 Kudos
Reply
nps9
Nintex Newbie

Re: set value of singleline and save the form

Jump to solution

Thanks Andrew. I have opened a ticket with support.

I also have made a new discovery that makes this less of a problem. It's not just moving the connected field, it's moving it below the button you are connected to. I have tested this issue on multiple lists and narrowed it down to only break if I move the single line below any of the connected buttons.

Reply