Skip to main content
Nintex Community Menu Bar

Redirect based on condition

  • February 27, 2018
  • 12 replies
  • 28 views
  • Translate All

Forum|alt.badge.img+6

Hi Team,

I would like to redirect to different page based on condition after submitting the form.

I tried using redirect url in advanced section of the form settings as below.

fn-if(item property value != "x", "/sites/sitename","sites/sitename/lists/listname")

But if is not getting resolved. I am getting navigated to below url

https://rootsite.com/sites/sitename/

fn-if(item property value != "x", "/sites/sitename","sites/sitename/lists/listname")

I dont understand what wrong i am doing. Please correct me.

Thanks & Regards

Usha

12 replies

Forum|alt.badge.img+14
  • Scholar
  • February 27, 2018

is it NEW form?

if so, all the item properties are yet empty, so your condition is always true, hence you're always redirected to "/sites/sitename"

Translate

Forum|alt.badge.img+6

Hello Marian,

Yes it is a new form. Thats my problem.

There are actually 2 buttons on the form. When i click 1 button the form should be saved and redirect to 1 URL .

Is another button is clicked form should be saved and redirect to a different url.

I am trying by inserting value in a field in the form connected to list. But that value is returning empty.

can you please suggest how to identify which button is clicked and then redirect based on that?

Thanks & Regards,

Usha

Translate

Forum|alt.badge.img+14
  • Scholar
  • February 27, 2018

you can configure different redirect URL per each button

213656_pastedImage_1.png

Translate

Forum|alt.badge.img+6

I am unable to see this Redirect URL for the button. So i need to do anything to make it visible?

Translate

Forum|alt.badge.img+14
  • Scholar
  • February 27, 2018

what forms version are you on?

it was introduced in v2.10.0.0 in March 2017

see release notes -  

Translate

Forum|alt.badge.img+6

Its 2013 version which we are using

Translate

Forum|alt.badge.img+14
  • Scholar
  • February 27, 2018

go to Form Designer >> Help >> About and you will see there exact version number

Translate

Forum|alt.badge.img+6

Version mention - About Nintex Forms 2.8.1.0

Translate

Forum|alt.badge.img+6

I even tried implementing the way mentioned at  

To implement button click in jquery function on click of javascript button.

It works sometimes. But sometimes it just redirects but doesnt save the form. 

Translate

Forum|alt.badge.img+14
  • Scholar
  • February 28, 2018

so you need to upgrade to get this functionality available

Translate

Forum|alt.badge.img+6

Hi,

i actually found a way to do this. Please share your comments on the implementation.

function MyFunction()

{

NWF$("savebutton").click();

alert("The savebutton was clicked.");

}

from below url

 

I just saved and redirected to the respective url

Thanks 

Usha

Translate

Forum|alt.badge.img+14
  • Scholar
  • March 1, 2018

to be honest, I do not see all these forced aside redirections reliable at all.

note when you make/invoke a click, it's asynchronous event. it in turn runs plenty of other asynchronous events (form recalculations, validations; then form submit; then server response need to be processed with possibly server redirect, etc.)

while these are being processed, you issue your own redirection. it's just a matter of coincidence when exactly this is processed. it might be processed too early and your form is not even submitted. or it might be queue to be processed too late but it will not get chance to be, since server response and/or redirect take place sooner.

Translate