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.

Portal Relationship Question-HELP!

Featured Replies

I'm working with an Employee Database that pulls Job Updates from a Job Entry file into a portal, and sorts by Effective Date with the most recent entry on top. This information is in a portal on a layout that will be used for viewing only, so I unchecked the "Allow creation of related records" to eliminate the blank row at the bottom of the portal. It works great! However...

I've now created the layout for updating the employee's record and want to add the information into the portal on this layout, rather than having to switch to the Job Entry File. I duplicated the portal relationship and checked the box to "Allow creation of related records," but when I view this new portal, it is not showing all of my related records but instead has duplicated the most recent record in place of however many records should be showing for that file (i.e. If an employee has 3 entries in the Job Entry file, this portal will show the most recent entry 3 times). I have tried creating a new relationship from scratch to no avail. The only relationship that will work is my original relationship, but I can't use the same relationship for viewing and editing (or can I)?

Also, is there a way to put the blank portal at the top?

I would appreciate any help.

kmoats

Hi,

I'm prety sure your problem in your 2nd portal is due to the fact that you didn't change your fields in the new portal. Which means you have fields from portal 1 into portal 2. Check each field in your second portal and verify that each of them is from the 2nd relationship you created.

Either way, you don't need a 2nd relationship because you can create different portals with only one relationship. Just copy your first portal in another layout (or a,ywhere you want) and check "allow creation of related records". Voila !

And to answer your last question : to my knowledge, no you can't put the blank lign on top.

O. smile.gif" border="0

  • Author

Thanks, Olive! I completely forgot about changing my fields to reflect the new relationship, but now it works like a charm!

I tried your suggestion of using the same relationship for both portals, but I only saw a check box for "Allow deletion of portal records" in the Portal Setup box. The check box to "Allow creation of related records" is found in the Define Relationship dialog box, and this would affect both portals. That's why I tried the duplicated relationship.

Thanks again, Olive!

You can trick FM into putting the empty portal row at the top.

Step 1:

Create a layout using the portal without “Allow creation of new records” (Lets call it (“entry” wink.gif" border="0

Use global fields placed above the portal to look like an empty portal row

Create a script to switch to this layout that also sets the globals to empty or 0 values

Create a calculating field that shows a button “SAVE” if any of these global fields have a value, and place this on the “entry” layout.

Step 2:

Create a calculating field (lets call this “last_row” that counts the number of related records: Count(Relationship_name::any field that has a value)

Step 3:

Attach a script to the calculated field that shows the button, that:

If it’s empty, exits the script

But, if it says “SAVE” performs the following:

1) Switches to a layout with a relationship that allows the creation of records (Or even better, the relationship portal is just hidden on the current layout)

2) Sets the last portal row fields to the global fields using the go to portal row step (last_row + 1) (See calculating field in step 2)

3) Then deletes the information in the Global fields

4) Returns to the original layout – (The button “SAVE” has gone)

Apart from a few polishing touches that’s it – I don’t know your level, so can only hope that you understand me here. If not, let me know and I’ll try to explain in more detail.

Rigsby

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.