Jump to content
Server Maintenance This Week. ×

Calculated Field from Several Field Logic


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

Recommended Posts

Hi All,

I don't really know if the Title really explains my situation, but here it is..

I have Four Fields: Name, Gender, Class and Policy

Policy Field is an Unstored Calculation with the calculation below with result set to Text

If ( Gender = "Male" &  Class = "Primary"; "RUNNING" ;"EXPIRED")

Meaning, my intention is to Set the Policy field as Running, if the Student is Male and in Primary Class, otherwise, it should be set to Expired..

The calculation does not work, some fields are displayed correctly with the correct value while others are not.

However, if I remove the Logic "&" from the calculation making it only a single criterion, If ( Gender = "Male" ; "RUNNING" ;"EXPIRED"), then it works well..

Why can't I compare several fields using "&"  or "OR"  with that function?

Is there a better way of actualizing this?

 

Link to comment
Share on other sites

The & does not mean and in FM.  You have to use the actual word  "and"   The & symbol is used to combined text. For example a calculation with  "FirstName" & "LastName"   with return  "FirstName LastName"

Your calculation should be

if (Gender = "Male" and Class="Primary";"Running";"Expired")

  • Like 1
Link to comment
Share on other sites

This topic is 2844 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.