Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Help with complex script!!!!!!!! You must be good if u get this


This topic is 6984 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am trying to create a function that would caculate a students "AI" for our recruting database: here is the formula. ((Critical Reading score + Writing)/2 +

(2 Highest SAT IIs)/2 + CRC = AI

First the CRC is a seperate formula can i call the reulst of that formula to be a variable in this formula. Secound there are different variables for the SAT score and I can replace them with different information. Can I have filemaker use alternate information if a score is not available i.e. if a score is not present substitute class rank for critical reading. email [email protected]

Posted

Cliftong:

You could make a custom function, sure. As far as your actual calculation, you seem to mostly be there. The trick is going to be the substitution in case scores are not available, and you'll end up using Case[] to figure out what to do.

To get a definite answer, I think you'll have to provide a bit more detail.

-Stanley

Posted

Since you have vs. 7, define your variables using Let(). That is its power. Example (if Critical Reading is number):)

Let(

[

base = If ( not Critical Reading score ; Class Rank ; Critical Reading score ) ;

SAT = Let(whatever lists you want) ;

]

... and specify each variable in the list. Then your following calculation will draw from the results of the variables in the list ...

To use another field as a variable, it makes sense to just use the other field within the calculation but I don't recommend using a calc within a calc. I feel it's better to include the calc formula instead; otherise FM's evaluation slows down (if referencing other calculations). Stanley is correct in that more information would be required to help you write the calc itself. Check out Let() and I think the logic will become clearer. :wink2:

BTW, your topic is "Help with Complex Script" and it's in the Custom Function section. I don't believe you need either for what you're attempting. Let() can do recursion also if needed (by calling itself). I would also pay attention to what portions end up as fractions, rounding etc. Many on this forum are GOOD but few are mind readers. :giggle:

LaRetta

This topic is 6984 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.