Jump 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.

Conditional Lookup?

Featured Replies

Hey All,

Anyone know how to implement a conditional lookup?

Here's the problem:

I have three tables: Customer, ContactLineItem, and Proposal.

In ContactLineItem, there are two fields: ContactType and Number (ex. data: Job Site, 555-5555)

In the Proposals layout, I want to create a lookup field that will look at the related records via customerID and copy from the ContactLineItem the telephone number if the type equals "Job Site".

How do I do this?

I cannot very clear imagine your task.

Do you want to lookup from 2 tables to table proposal?

Are you sure you want to use a lookup here? What if the contact's job site number changes - shouldn't the number in Proposals reflect the change?

  • Author

Are you sure you want to use a lookup here? What if the contact's job site number changes - shouldn't the number in Proposals reflect the change?

Comment: The job site phone number may change in the future, but the Proposal needs to reflect the job site number at the time it was created.

I've been thinking about this and I think the problem is that I am trying to accomplish it in the wrong way. I think what I want to do is write a script that, upon creation of a proposal, will set the fields on the proposal with the data needed based on the address and contact records available.

Thanks for the consideration.

Well, you could do a lookup - but you would need another relationship for this, one that is filtered so that only "Job Site" types are related.

Another option is to auto-enter a calculated value - see a very similar issue here:

http://forum-en.filemaker.com/fm/board/message?board.id=FM-en-4&message.id=34180#M34180

  • Author

Well, you could do a lookup - but you would need another relationship for this, one that is filtered so that only "Job Site" types are related.

Another option is to auto-enter a calculated value - see a very similar issue here:

http://forum-en.filemaker.com/fm/board/message?board.id=FM-en-4&message.id=34180#M34180

Comment,

I'm trying to understand what that custom function does and then apply it to the problem I have... could you elaborate on how you would implement this (CorrespondingValue)?

The function is very similar to the VLOOKUP function in Excel: it finds a given value in one column and returns the value from the same row in another column.

In this case, you would look for "Job Site" in the 'column' produced by List ( Phones::Type ) and return the corresponding value from List ( Phones::Number ). Since List() always follows the sort order of the relationship, these values would come from the same record (assuming there are no empty values in preceding records).

Create an account or sign in to comment

Important Information

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

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.