Scripting returnValue options

Scripting returnValue options

cedgingtonNJCK2
Participant Participant
265 Views
4 Replies
Message 1 of 5

Scripting returnValue options

cedgingtonNJCK2
Participant
Participant

I'm just getting started with FM scripting, I've got some scripts working that are allowing us to create custom ID patterns based on our customer's existing internal naming / numbering strategy. Now I need to tackle some scripting in a variety of other places to improve workflow, etc. One thing I noticed is that some of the sample template Validation scripts have a returnValue that is an array of strings, which according to another post, results in those messages being displayed to the user and the operation being cancelled (as the presence of user messages indicates validation failed). I'm curious if any other types of scripts (non-validation) have returnValue specific functionality - and if that is documented somewhere? For example, can we return a messages array from an action script - and if so, what impact does that have on the action itself?

 

Thanks,

-Chris

0 Likes
Accepted solutions (1)
266 Views
4 Replies
Replies (4)
Message 2 of 5

philipfrench
Collaborator
Collaborator

Condition scripts return true/false. If false, the transition is not enabled. If true, then the user can do the transition (the condition script is only run if the user has permission to do the transition).

 

Action scripts do not return anything. I would like them to be able to return messages, and other feedback, etc... But they don't.

 

Your description of validation scripts is correct.

0 Likes
Message 3 of 5

sven.dickmans
Autodesk
Autodesk
Accepted solution

Does this help?

 Screenshot 2025-05-16 at 19.59.40.png

Message 4 of 5

cedgingtonNJCK2
Participant
Participant

Oh wow - yes. Thank you. Is this from some publicly available documentation @sven.dickmans ?

 

-Chris

0 Likes
Message 5 of 5

sven.dickmans
Autodesk
Autodesk

Unfortunately not, I created this slide for an internal training.