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

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

Recommended Posts

Posted

I'm trying o figure out a calulation. I know how id do it in PHP or C++ but cant find how to translate that to the Calcualtion funcion in the database define calulations.

A little help?

psudo php code

If ((isset(CompanyID)){

if (Records::Company == '' AND Records::CompanyID == CompanyID){

UniqueName = Records::First Name;

UniqueName .= " ";

UniqueName .= Records::Last Name;

}else{

UniqueName = Records::Company;

}}

Posted

also simpley setting UniqueName = Records::UniqueName would work what im really hung up on is how i woudl check for CompanyID, match it against Records::CompanyID and then find the relevent records to generate either the above Unique name or the the more complext claulation inthe previous post

Posted

this is about as far as i can figure

If (CompanyID = Records::CompanyID; cUniqueName = Records::cUniqueName; "No Match" )

imtrying for the simple one first

if CompanyId = the company id in Records cuniquename = records unique name

but the result its returning is a ?

Posted

I'm not sure what you're doing, but you don't really need a calculation to get the value of Records::cUniqueName. You can use the relational tools in Filemaker to get it more directly.

Assuming the current table is called CurTable, create a relationship between the ID fields (you do this on the Define Database/Relationships page):)

CurTable::CompanyID <-> Records::CompanyID

Then, if you put Records::cUniqueName on your layout, it will have the cUniqueName for the record in Records that has the same CompanyID.

You might want to look into some relational design theory to get a better grip on this most powerful aspect of databases.

HTH,

David

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