Use break or exit in UI action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2017 01:16 AM
If the else block is executed, the function publishitem() will not run. Can this be achieved ?
PFA snapshot as I am not able to copy paste the code.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2017 02:13 AM
Hi Amit,
In that case the publishitem function will only call when your answer = true. but you want that it should not run when execution comes in the else part. so that code should be work it should not call the publisheitem function when it comes in the else part.
Also gsft statement also written in the if block only so it will run only that time when control comes inside if.
I request you to test it once like that control goes inside else part then see the function is calling or not?
Regards,
Abhimanyu Bansal
-----------------------------------------
Kindly LIKE or MARK Correct/Helpful, if you are satisfied with my response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2017 01:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2017 02:42 AM
Hi Amit,
I tried to replicate the issue and found that g_form.save() is causing the issue.
This function saves the form and stays on the same page but it does call the server and reloads the page after setting values.
I commented the code for g_form.save and it stayed on the same page.
Please try this approach.
Thanks
Gaurav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2017 02:52 AM
somehow i believe that the values on the form would not be updated/replaced with the new values ,with this particular approach.Please correct me if I am wrong.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2017 02:57 AM
Hi Sharique,
g_form.save() does save the values on the form(whatever changes you make on the form).
Tried and tested