Workflow 2010 - Tasks

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Katerina.C
Posts: 11
Joined: Fri May 11, 2018

16 Jul 2018

Hello,

I´m trying to edit form of workflow task of Workflow 2010. I tried to set buttons based on these instructions https://spform.com/buttons/customizatio ... oint-forms.

I changed in code field TaskOutcome to Outcome. But It is not working.

fd.field('Outcome').value('Rejected');
fd.field('Status').value('Completed');

Do you have experience with that? I can change field %completed, but Outcome not. So worklfow won´t go to next step after I complete task.

Thank you very much for any help.

K.

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

16 Jul 2018

Dear Katerina,
So, this code works?

Code: Select all

fd.field('Status').value('Completed');
But this one doesn't, correct?

Code: Select all

fd.field('Outcome').value('Rejected');
Please, select the the Outcome field on the form, make sure it's present and check its InternalName, it must match the one that you are using in your JavaScript:
InternalName.png
InternalName.png (4.54 KiB) Viewed 2519 times
Cheers

Katerina.C
Posts: 11
Joined: Fri May 11, 2018

17 Jul 2018

I checked InternalName. It was WorkflowOutcome. I changed it in code, but it is still not working.

Code is:

fd.field('PercentComplete').value('100');
fd.field('Status').value('Completed');
fd.field('WorkflowOutcome').value('Approved');

PercentComplete and Status works correctly.

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

17 Jul 2018

Dear Katerina,
What type of field is it? It might need a different type of input.

Can you open the form in a browser, select Outcome to be 'Approved', open console and write the following code? Press enter after inputting:

Code: Select all

fd.field('WorkflowOutcome').value();
Whatever you get as an output, should in theory work as an input in your code.
Cheers

Katerina.C
Posts: 11
Joined: Fri May 11, 2018

18 Jul 2018

I think this some special Text field created by Workflow 2010. If I click into Content Type, column WorkflowOutcome is not in Columns. I can see it just in view of Task list and Forms Designer.

I tried to write fd.field('WorkflowOutcome').value(); in console, but I get message that fd is not defined.

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

18 Jul 2018

Dear Katerina,
If this is the case, it might be tricky to do. Are you opening this form in dialogue mode? Otherwise, the fd variable should be defined. You can either try to open it in full screen or add the following line to Forms Designer's JS Editor:

Code: Select all

window.fd = fd;
And try the same code once again from the console.
Cheers

Katerina.C
Posts: 11
Joined: Fri May 11, 2018

13 Aug 2018

I got this message:
workflow.PNG
workflow.PNG (11.73 KiB) Viewed 2488 times

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

13 Aug 2018

Dear Katerina,
Not sure, are you inputting - fd.field('WorkflowOutcome').value(); or fd.field('WorkflowOutcome').value("Approved"); ?
To return a value, you need to input specifically:

Code: Select all

fd.field('WorkflowOutcome').value();
I assume that fd.field('WorkflowOutcome').value("Approved"); doesn't work from the console either, correct?
Cheers

RMIC
Posts: 96
Joined: Sun May 10, 2015

16 Apr 2019

Hello,

I have the same problem. Is there a solution to this, how the column "WorkflowOutcome" can be set?
Attachments
Set_WorkflowOutcome.PNG
Set_WorkflowOutcome.PNG (35.41 KiB) Viewed 2326 times

User avatar
AlexZver
Posts: 232
Joined: Mon Aug 27, 2018

17 Apr 2019

Dear RMIC,

Have you tried this approach? https://spform.com/buttons/change-appro ... -edit-form

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 15 guests