I am unable to take screenshot of ui path forms using a button component

I need to take the screenshot of forms using a button.
The sequence consist activities in the following order.

  1. a multi assign activity in which 4 variables are assigned to base 64 images which will be used in the “HTML component” of forms.
  2. Form designer.
  3. Inside from designer (in the “do” sequence) there is a “if” block.
  4. The code for taking the screenshot is present in the “if” block.

When I am disabling the multi assign activity, I am able to take the screenshot by clicking the “Take Screenshot” button which i declared in the forms. The key field for this button is “screenshot” which is of Type “Boolean”.

But as soon as i am enabling the multi assign activity, the execution is not enetering the “Do” sequnce as a result of which iam not able to take the screenshot.

Any help would be appreciated.

Are you setting a value in the multi-assign activity to something that causes the While condition of the Do to be skipped?

Yes, I think so. I need those values in the HTML component as I need to display some images on the forms during the run.
Can someone help me with a javascript code which will be written inside the “advanced conditions” of “Take Screenshot” button component. I think javascript code will work.

You may want to post the code here if possible so that the community can look at it and give their inputs.