Skip to main content

Hey mates

 

Is there any way we can disable button on Smartforms while  form initialization  if work list item is already actioned

Hey Niks,

 

There are rules you can set up for SmartForms Client Events where you can do something like the following:

 

If Current Workflow Activity is "Activity X"

  then open the "Activity X" worklist item

  then on "X View" show (or hide; disable/enable) "X" control

 

If you aren't involving a SmartForms Client Event and are rendering the SmartForm on a website in an iFrame or something like that you can also do something like 

 

When "X" control on a View is Clicked

then on "X View" hide "X" control

 

With the above suggestion, basically you could set it up to hide the control immediately after the control is clicked or use the Enable/Disable Actions rule. 

 

If these suggestions don't help you out. Could you describe what your workflow looks like before and after the action? What are the Events involved (e.g. SmartForms Clients events, SmO events, etc.)?

 

Maybe instead of disabling the control after the work list item is already actioned, you could just disable it/hide it and then enable it/unhide it when it's needed. If you don't need to use the control as much as you need to hide/disable it, this would take less effort and you could just disable and hide it on Designer when you edit the View/Form the control lives on and then just render it briefly during the time it's actually needed using the rules.

 

How have you tried to design the rules previously to get this to work just so we know what doesn't work and don't suggest to you things that you've tried already. This will help expedite you getting help if you need more assistance. Good luck! 

 


Hey  @alyssa_v,

Thanks for your reply.

Which rule should i apply. i havent find any rule which check for Worklist item Status.

 

Here my sceniro

I have simple approval workflow with aaprove / reject button. Once reuqest has been submite i had sent mail to approval with Smartform link in it. he need to click on that and approve/ reject the reuqest. 

My problem is if he allready take action on that and suppose he again click on link in email smartforms get open with approve/ reject button and if he click on approve /reject he is  getting error "worklist item not found for k2" bcz he has allreay take action on it. So i want to prevent.

So i am looking for solution on form load which check if worklist item is allready action it should disble approve/ reject button

 

 


Hey Niks,

 

Just to clarify -- are you sending a link to the runtime of the SmartForm from the email? It sounds like you're allowing the worklist item to be actioned via SmartActions OR SmartForms, but with its current set up it tries to do both (if the user clicks on the link). And just to make sure, after the item is actioned, it goes through the rest of workflow just fine?

 

The problem is (I think) you have to have a SmartForms Client event to be able to specify a Workflow Activity you want to point the rule at. 

 

Would it be a reasonable solution to pick one or the other if my second question (SmartActions/SmartForms) is correct? You could not use SmartActions in the email and just depend on the SmartForm to action the task to bypass those errors and not have to get messy with the rules. 

 


Hi,

 

The best way to do this is to put in a condition as part of the "when form is initializing"  rule that checks if there is a specifc error and if so, disable the form.

 

I normally create an advanced condition and then check from the System Values if the Error Message contains 26030 or 26031.

These two message IDs indicate that the worklist item has already been actioned.

If you find one of these in the Error message then you can assume the task has been actioned.

11411i4FACDD6143A8C2D0.png

 

I also check for any other errors and display a more friendly message as a "catch-all" scenario.

 

Hope you can also use this!

Regards,

JohanL


hello,

 

@Alyssa - I am  sending a link to the runtime of the SmartForm from the email.

I had SmartFormClient Event  which load the data when we click on email link.  if user open the runtime smartform link 2nd time it load all data and have approve/reject button and if he can able to click on button and get error message bcz its allready action. So  i want to prevent that.

 

@ @JohanL - Its seems Error Context is available after 1.0.6 version. I had Smartform (1.0.3) version so i am not  able to check error message on form load. Is there any other way i can checked error on form load event for my smartform version.

 

Thanks you guys for your help

 

 


Hi @JohanL ,

Any help on this issue.


Hi,

 

Unfortunately it has been a while since I worked on 1.0.3, but if I remember correctly there weren't much that you could do.

 

Please investigate upgrading as the later releases have several fixes and improvements which will greatly enhance the user and performance experience.

 

Regards,

JohanL


Reply