Using Custom Functions in iLogic

Using Custom Functions in iLogic

fsdolphin
Collaborator Collaborator
3,009 Views
2 Replies
Message 1 of 3

Using Custom Functions in iLogic

fsdolphin
Collaborator
Collaborator

Hi,

 

First of all I'm new to iLogic and VB/VB.NET but I have some programming experience with C++, Objective-C, Javascript etc. I'm writing a rule and I was wondering if there is a way to add and call custom functions within iLogic?

 

Is there a way to add and call custom functions within iLogic?

 

I tried...

 

    Function someFunction
    ' do something
    End Function

also...

 

Sub Main()

    Function someFunction
    ' do something
    End Function

End Sub

 

But I keep getting the following error "Statement cannot appear within a method body. End of method assumed."

 

 

Can someone be so kind and explain how can I use custom functions within iLogic?

 

Thanks a lot.

 

0 Likes
Accepted solutions (1)
3,010 Views
2 Replies
Replies (2)
Message 2 of 3

fsdolphin
Collaborator
Collaborator
Accepted solution

Got it, I guess Visual Basic works in a similar way as C++ 

 

 

 

Sub Main()
    showMessage()
End Sub


Function showMessage
    MessageBox.Show("Some Message", "Title")
End Function
Message 3 of 3

Anonymous
Not applicable

Thanks. Your solution also help me. I search for the main function in iLogic.

0 Likes