Run an external iLogic rule when I hit DONE on a form?

Run an external iLogic rule when I hit DONE on a form?

steveh5
Advisor Advisor
1,612 Views
5 Replies
Message 1 of 6

Run an external iLogic rule when I hit DONE on a form?

steveh5
Advisor
Advisor

Gang...

Think this should be a simple one, but can't figure it out. I would like to run a small bit of external iLogic right after I hit the DONE button on a form.

steveh_0-1683824186195.png

I can't use a trigger because the files never gets saved.

Possible?

Steve Hilvers
Inventor Certified User / Vault Professional Influencer
0 Likes
Accepted solutions (2)
1,613 Views
5 Replies
Replies (5)
Message 2 of 6

WCrihfield
Mentor
Mentor

You can drag an iLogic rule right over into your form, then use that button to close your form with.  When you click it, it will run the rule.  There are several options for what all happens, and when when you click that button in your form.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 6

WCrihfield
Mentor
Mentor
Accepted solution

Attached is a 2022 PartDocument with a single simple iLogic rule in it, and a single simple iLogic Form in it, set up the way I mentioned.  While the top node within the Form Editor selected, I changed the 'Predefined Buttons' property to None.  That gets rid of the standard, built-in button that closes the form.  Then I chose the Rules tab on the left side of the form editor screen to see the available rules.  Then dragged the one local iLogic rule over into the right side, at the bottom of the other line items.  Then with the line item for that rule selected on the right, I used the properties area at the bottom right area of the form editor screen to change the properties of that rule button.  The top property is its Label.  I changed that to "Done", just like the other button we got rid of.  Then I changed the 'On Click Action' property to 'Apply and then Close and then Run Rule'.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 4 of 6

steveh5
Advisor
Advisor
Accepted solution

That's where I was going....

I added the external ilogic rule to the form but couldn't figure a way to close the form.

Then I referenced your example....and you had an additional row on the label that I wasn't seeing..... the "On Click Action" row....

Come to the conclusion that the only difference was the iLogic being internal vs external....

I then made the rule internal....and now I get a whole different set of Actions and it works.

 

Rather not make the iLogic internal because we use it elsewhere....but at least it works like I want now.

 

THANKS!!!

Steve Hilvers
Inventor Certified User / Vault Professional Influencer
0 Likes
Message 5 of 6

WCrihfield
Mentor
Mentor

Yea, I forgot about the Global Form & External iLogic rule combination not giving us those 'On Click' options.  On strategy I often use when an internal rule is the best option for some sort of efficient automation, is make that internal rule as simple and basic as possible (easily replaceable in bulk), and simply have it run an external iLogic rule which contains all the actual details.  Many of my internal rules just contain some names of local parameters (Blue), just set to dummy variables, just to cause that rule to automatically run when the values of any of those specific parameters changes, then a line to run an external rule.  Then the external rule that it runs does all of the actual work.  Just a tip you may be able to use.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 6 of 6

steveh5
Advisor
Advisor

Yep...that makes sense. THANKS for the help!

Steve Hilvers
Inventor Certified User / Vault Professional Influencer
0 Likes