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.

One to many relationship problem

Featured Replies

I'm still struggling with this problem. Any ideas would be greatly appreciated. Here goes:

This is for a Credit Processing Solution which I've been building forever.

There is a Customer File (with a Cust ID field) which is related to a Phone Nos File (with a Cust ID field - using allow creation of related record).

On one layout of the Customer File the user can enter as many Phone Nos for a customer as they like (within a portal). The user also can enter a Phone Type (Residence, Work, Cell, Fax, etc).In the next layout of the Customer File, the user may enter a Work Phone No. and Work Fax No. (Single Fields, not in portals).

Here's what I'm trying to figure out... If the user DID NOT enter/create a Work Phone No. in the Portal on the first layout, they should be able to enter it on the second layout, then when switching back to the first layout, it should show up as a related record in the portal. However, if the user DID enter these values (Phone type = Work Phone) in the first layout, then the work phone number should already be filled in when they get to the second layout. I wish to accomplish this without scripting it and without using plug-ins. Is there any possible way to do this?

I'm quite baffled. Thanks.

You'll need to extend your key fields (Customer ID) in both file with an flag for ex. when work phone is selected use " w" or whatever in related file, in master file you could bind it to layout (if you don't want to use script)

For ex

CompundCustumerID=Customer ID & Case(Status(CurrentLayoutName)="WorkPhoneLayout","w","")( in master file)

CompundCustumerID=Customer ID & "PP"

Customer ID & flagWorkPhone (in related file) where "PP" stands for carriage return.

Than change fields in relationship from Customer ID to CompndCustomer ID allowing creation of related records.

Dj

  • Author

Dj,

Thank You for your reply. I almost had it working, then realized that I can't set the relationship to Allow Creation of related records, because in this case the related field is a calculated result. frown.gif

Any ideas how I can proceed?

Thanks,

Chris

You have to use both relationships.

CustomerID->CustomerId (allow creation of related records)

CompundCustumerID->CompundCustumerID ("normal" relationship)

Dj

  • Author

Sorry DJ,

I've been trying everything, and I just can't get it. I will post here my Customer Test file

and my Phone Test file. If you could be so kind as to have a look at it, and tell me what I'm doing wrong, I'd be ever so grateful.

Thanks,

Chris

  • Author

Trying to attach file here Seems I can't even do that!) How pathetic, huh?

  • Author

For anyone who might be interested in this same problem. I finally sent my files to DJ directly via e-mail (could not seem to attach a file in this forum). He is very very clever and managed to solve my dilemna using both relationships and a simple script. I had really hoped to solve this without using a script, but in this case, scripting the solution made a great deal of sense. The script was tied to the actual field (which was formatted not to allow entry). Therefore, if the user clicks on the field, it runs the script to check if the field had already been populated with data. If not, it goes back to the original layout, and adds the related record in the portal, and sets the value to "Work Phone" as I had wished.

So once again, DJ, I thank you for your ingenouity and assistance! You are very clever!

Cheers to you, bud. (If you lived here I'd take you out and buy ya some beers!) smile.gif

Chris

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.