Crow Canyon Software Forum

Forum Navigation
Please or Register to create posts and topics.

Using the same variable value for multiple items in a Custom Action

Each month we have to print forms for several assets that need to be approved for disposal—yes, we need a paper copy of the form. The user is prompted for a Disposal Date which populates a variable in the Custom Action, and that value is used in the printed form and needs to be saved back to the original record. Multiple items are selected in the list when calling the Custom Action.

Is it possible for the user to enter the Disposal Date once and have it apply to all selected items rather than entering it multiple times? If not, would it be possible in Print Manager using javascript?

Thanks for the help!

If it makes sense to do so, I would recommend using the "Update Item" action with the "User input column" option to get the disposal date as that will capture the date, put it on the Asset, and also allow the user to apply the same date to all selected items. You can then use this placeholder on the template instead of the variable.

However, if there is some reason you need to do this through the variable option, let me know and we can try to think of ways to make this work.

Thanks for the info, James. There's one thing I'm not sure if I understand, how could I "allow the user to apply the same date to all selected items"; I thought each selected item was processed separately? I've tentatively got it set up as follows:

  • Prompt user  for Disposal Date & save in a variable
  • Get items based on a view that includes the needed records
  • Process a loop on those items
    • Save the variable to the item's disposal date
    • Call another Custom Action to print the form
  • End loop

The 'called' Custom Action uses the date just saved in the item.

Is this what you mean, or is there a better way?
Thanks again!

Uploaded files:
  • 2024-02-26-12_22_58-Generate_ALL_disposal_forms.png

I see now you are not selecting multiple items in a list view, but using a Query List action instead. The suggestion I proposed would work if your users manually selected the items in a list view and then ran the action from the List View ribbon. When doing so, you get an option to apply the same update to all selected items. I'll check with my team if they have any suggestions for your scenario.

Thanks for the quick reply. This looks like it will do the trick so there's no need to put a lot of effort into checking for another method.

Art