Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Understanding Calculations from a C++/PHP perspective

Featured Replies

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;

}}

  • Author

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

  • Author

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 ?

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

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.