OrangeScape Developer Community

A community for Application Developers on OrangeScape's Platform-as-a-Service

Sometimes when you write rules, it so happens that the condition, and what to do next are all calculated terms.  Let's Consider this example.

=IF( FIND(A2,B2) > 0 , DSEARCH(User.UserID=F3) , DSEARCH(User.useraccounts<F2) )

This is a basic IF rule.  

Let's Say FIND(A2,B2) = 9, means the condition returns TRUE, so if true DSEARCH(User.UserID=F3) will be executed.

 

Now what will happen if F2 Changes.  This IF rule will be re-evaluated, eventhough the Condition did not change, or does not favour the execution of the else part.  Why?!.  Orangescape has a dependency based rules execution.  Which means, if any of the parameter values changes then the rules will be executed again.

 

This will cause a small lag in the performance, whenever the function updates.  Because everytime a parameter changes two DSEARCH has to be executed.  This can be avoided by seperating the functions which are used internally out to different cells and using the cell address in the forumlas.

 

rewriting the above formula:

B3 = IF( FIND(A2,B2) > 0 , C3 , D3 )

C3 = DSEARCH(User.UserID=F3)

D3 = DSEARCH(User.useraccounts<F2)

 

Now if C3 changes, then D3 is not re-evaluated again. so only one DSEARCH is executed, which results in less time to evaluate.  

Views: 61

Comment

You need to be a member of OrangeScape Developer Community to add comments!

Join OrangeScape Developer Community

Comment by Kamal.S on March 27, 2014 at 3:14pm

© 2018   Created by OrangeScape Technologies.   Powered by

Badges  |  Report an Issue  |  Terms of Service