Edited: 9/23/2018 4:48 AM
Picture Placeholder: System Account
System Account
How can I repsond to an approval task within the form through SPARK?

​is there is any way that i can repsond to an approval task of a workflow designed by sharepoint designer therough SPARK forms, i want the user to open a section within this form and aprrove or reject the request.

Picture: Mike Odeh
  • Mike Odeh
/_layouts/15/images/person.gif" alt="Picture Placeholder: System Account" />
System Account

​is there is any way that i can repsond to an approval task of a workflow designed by sharepoint designer therough SPARK forms, i want the user to open a section within this form and aprrove or reject the request.

7649/20/2018 8:47 AM9/23/2018 4:48 AMNoCodes & Scripts
7.30565376194352
39/20/2018 8:47 AM1
Jim Hidson
Posted: 9/23/2018 2:48 AM
Picture: Jim Hidson
Jim Hidson

​Hi Mik,

You can do that using the updateCurrentUserTask() function, you can change its parameters to have approve or reject actions.

 
also you can get the current form's user task ID and Task name using the folloing functions:

 
getCurrentUserTaskID()

 
getCurrentUserTaskName()

 
the following example show how to use the fuction in a proper way:

 
updateCurrentUserTask('Tasks',getCurrentUserTaskID(), true, 100,'Completed', 'Approved', 'Approved')​


Note that this function works on sharepoint designer designed workflows and not on Nintex.​
Picture: Jim Hidson
  • Jim Hidson
http://www.itlaq.com:80/my/User%2520Photos/Profile%2520Pictures/jim_MThumb.jpg?t=63627189186" alt="Picture: Jim Hidson" />
Jim Hidson

​Hi Mik,

You can do that using the updateCurrentUserTask() function, you can change its parameters to have approve or reject actions.

 
also you can get the current form's user task ID and Task name using the folloing functions:

 
getCurrentUserTaskID()

 
getCurrentUserTaskName()

 
the following example show how to use the fuction in a proper way:

 
updateCurrentUserTask('Tasks',getCurrentUserTaskID(), true, 100,'Completed', 'Approved', 'Approved')​


Note that this function works on sharepoint designer designed workflows and not on Nintex.​
Mike Odeh3309/23/2018 2:48 AM9/23/2018 2:48 AM
9/19/2018 7:49 AM1
Mike Odeh
Posted: 9/23/2018 3:15 AM
Picture: Mike Odeh
Mike Odeh

Could ​you show me how to set it inside button click function?

Picture: Mike Odeh
  • Mike Odeh
http://www.itlaq.com:80/my/User%2520Photos/Profile%2520Pictures/mike_MThumb.jpg?t=63624568071" alt="Picture: Mike Odeh" />
Mike Odeh

Could ​you show me how to set it inside button click function?

Mike Odeh3309/23/2018 3:15 AM9/23/2018 3:15 AM
9/20/2018 8:47 AM
Posted: 9/23/2018 3:16 AM
Picture: Jim Hidson
Jim Hidson

Of course Mike!

create a rule with [Action] Type and Event [onLoad]

write the following code in the Action script area:

function Approvetask() { updateCurrentUserTask('Tasks',getCurrentUserTaskID(), true, 100,'Completed', 'Approved', 'Approved')​ }

onClick(Button1, Approvetask()​)​

Picture: Jim Hidson
  • Jim Hidson
http://www.itlaq.com:80/my/User%2520Photos/Profile%2520Pictures/jim_MThumb.jpg?t=63627189186" alt="Picture: Jim Hidson" />
Jim Hidson

Of course Mike!

create a rule with [Action] Type and Event [onLoad]

write the following code in the Action script area:

function Approvetask() { updateCurrentUserTask('Tasks',getCurrentUserTaskID(), true, 100,'Completed', 'Approved', 'Approved')​ }

onClick(Button1, Approvetask()​)​

Mike Odeh3309/23/2018 3:16 AM9/23/2018 3:16 AM
9/19/2018 7:49 AM1
Mike Odeh
Posted: 9/23/2018 3:17 AM
Picture: Mike Odeh
Mike Odeh

​Great!!! thank you!​

Picture: Mike Odeh
  • Mike Odeh
http://www.itlaq.com:80/my/User%2520Photos/Profile%2520Pictures/mike_MThumb.jpg?t=63624568071" alt="Picture: Mike Odeh" />
Mike Odeh

​Great!!! thank you!​

Mike Odeh3309/23/2018 3:17 AM9/23/2018 3:17 AM
9/20/2018 8:47 AM