If you need to Execute multiple DataFunctions on a button click , it is not possible to map the Action Control(Button) to multiple functions.
However you can write a script to run the functions.
See sample in blue below.
Please note we are using Index for item and not name, so you need to ensure you are running the correct function. To get the correct name you could do
Print Document.Data.DataFunctions.Item[0]
Replacing the index to verify the name, once you know the index you can then use the following script to trigger the DataFunctions
Document.Data.DataFunctions.Item[0].Execute()
Document.Data.DataFunctions.Item[1].Execute()
Please note that this functions are run triggered immediately one after the other, there is no waiting for 1st to finish to trigger the second.
If you need to wait for function 1 to finish and then trigger function 2, then make sure that function 1 returns a unique value that is assigned to a property, and then attach a script to property change, which will trigger subsequent desired datafunctions.
However you can write a script to run the functions.
See sample in blue below.
Please note we are using Index for item and not name, so you need to ensure you are running the correct function. To get the correct name you could do
Print Document.Data.DataFunctions.Item[0]
Replacing the index to verify the name, once you know the index you can then use the following script to trigger the DataFunctions
Document.Data.DataFunctions.Item[0].Execute()
Document.Data.DataFunctions.Item[1].Execute()
Please note that this functions are run triggered immediately one after the other, there is no waiting for 1st to finish to trigger the second.
If you need to wait for function 1 to finish and then trigger function 2, then make sure that function 1 returns a unique value that is assigned to a property, and then attach a script to property change, which will trigger subsequent desired datafunctions.
Comments
Post a Comment