Jump to content

Simple Case Function


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

Recommended Posts

Hello Everyone...

I have a simple case function that as you can see makes certain fields change depending on the referenced field.

Case (

Policy_Active_Inactive = "InActive";"Holding";

Policy_Active_Inactive = "Active";"InHouse Review";

Policy_Active_Inactive = "Closed";"Closed")

What I need to do is make a cell on another tbale change... On the first line you can see when Policy_Active_Inactive turns to Inactive the Status Field (thats the field that its on) changes to Holding...

What I need is to change the status field on the main table to Holding...How?

Can someone help me Please?

Thank you...

Link to comment
Share on other sites

Run the same Case statment on the related field in the main table.

SetField["relatedMainStatusField",

Case (

Policy_Active_Inactive = "InActive";"Holding";

Policy_Active_Inactive = "Active";"InHouse Review";

Policy_Active_Inactive = "Closed";"Closed")

]

Make sure you run this Case statement before you change the Policy_Active_Inactive field Case statement.

Link to comment
Share on other sites

ok great...

Does it then look like this?

Case (

Policy_Active_Inactive = "InActive";SetField["relatedMainStatusField","Holding";

Policy_Active_Inactive = "Active";"InHouse Review";

Policy_Active_Inactive = "Closed";"Closed")

? Not sure how really to plug that in?

Link to comment
Share on other sites

In your main file you are relating to the child record...

Case (

related::Policy_Active_Inactive = "InActive";"Holding";

related::Policy_Active_Inactive = "Active";"InHouse Review";

related::Policy_Active_Inactive = "Closed";"Closed")

Note that this only works on a 1:1 relationship (main:child)

If you have a 1:many relationship you will need a more complex definition.

Link to comment
Share on other sites

SetField ["Policies::Policy_Active_Inactive",

Case(

Ins_Status="Holding","Inactive",

Ins_Status="In House Review", "Active")]

I think this is what you said...If it is FM7 does not know SetField Function...

I put this on the main page where I have radio buttons...what I want to do is when I change one of the radio buttons I would like the Policies page Status field to change...

?

Joseph

Link to comment
Share on other sites

Joseph, click on the Main Index link near the top of this page. Running down the right-hand side of the page you will see links to several FileMaker instruction manuals and other resources. These are good books and you need one or more of them. Sooner or later people here are going to stop replying to your questions.

Jerry

Link to comment
Share on other sites

For a one to many relationship, a field definition is not a good way to solve the problem. I would script the change of the status and set the new status into a text field in the Main table.

Link to comment
Share on other sites

This topic is 6435 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
 Share

×
×
  • Create New...

Important Information

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