If parameter is greater than zero then run this rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In short, I'm trying to trigger a custom iProperty to be used is a parameter called "Total_Length" is greater than zero, or 0.000 to be specific.
I have a an existing rule that is called "Calculate ERP Amount Conversion" and it's a simple code that writes to a custom iProperty named ERP Amount that I'm also rounding down to 3 place decimal.
iProperties.Value("Custom", "ERP Amount") = Parameter("ERP_Amount_Conversion") iProperties.Value("Custom", "ERP Amount") = Round(Parameter("ERP_Amount_Conversion"), 3)
Anyways, what I'm trying to do is that if a user parameter named "Total_Length" is greater than zero, then run the above code, otherwise allow the custom iProperty "ERP Amount" to remain editable for manual data entry instead of relying on the data from the user parameter. Hope that makes sense lol.
It seems pretty straight forward, and I'm sure it is, but I'm running into a syntax snag when trying to do this with If Then End If statements. There may be a better way to achieve what I'm trying to do in the original code for all I know and I'm open to any suggestions.
If Parameter("Total_Length") > 0.000 Then iLogicVb.RunRule("Calculate ERP Amount If Total_Length is extrusion") End If
Above is what I've got so far but I'm getting the syntax error on Line 2.
Rule Compile Errors in Catch, in Test.ipt
Error on Line 2 : Syntax error.
Kenny
If this post solved your issue please mark "Accept as Solution". It helps everyone...really!