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.

New Record in portal - unwanted blank field added.

Featured Replies

[Newbie] - I'm trying to get my head around what would appear to be a very simple task (according to some of the video's I've found online), but I can't get the final result I'm looking for.

I have a portal which I'm using to create a new record (customer address), inside my main "Contacts" layout, inside of that portal I'm trying to create a new record using a button (external to the portal). The button should add a new Record and display the Portal Row ONLY when the button is used for this purpose. Otherwise the portal should only have ONE blank field waiting to be populated

Presently I have the Portal and button working but not as I need it to. When I have finished adding text inside of the Portal Row field and click outside of it or use "tab", a blank field is automatically created below - which is where the problem lies. If I continue to press the "Add New Record" button, it keeps adding blank fields below the one above. Ideally if the field above is blank, I should not be able to keep adding blank fields/records to the portal until the field above is populated.

I'm presuming that I'm going to need to use the "IF" & "ELSE" functions inside the script, but am not (yet) familiar with either of these.

Any help would be appreciated.

 

566943739_ScreenShot2021-05-23at6_02_19PM.png.e6fb62c89bfd69590d2fb287fcefccca.png2103714735_ScreenShot2021-05-23at6_00_22PM.thumb.png.d6280dc42964bfe1ac30b39940a3fe8f.png

Edited by St3v1e
Add screenshots

46 minutes ago, St3v1e said:

When I have finished adding text inside of the Portal Row field and click outside of it or use "tab", a blank field is automatically created below - which is where the problem lies.

Is the relationship defined to allow creation of records in the portal table?

 

I probably would either do the blank row at the top, second portal trick, or have the button pop open a small window to enter new information/portal row.

  • Author

Hi Comment:- I think I have this setup correctly - see screenshot below: But I noticed also that this created a one-to-one relationship and not one-to-many - is that correct? I was assuming one contact would have many associated records in the 2nd table?

1872487918_NewRelatedRecord_Relationship_Resized.png.881188fefa4acbb6b3c3b9871d7c8e9f.png

 

Hi Steve: Thanks also for your feedback:- I'd prefer not to have a blank row at all, it'll confuse others when I get this up and running. I like the idea of the pop-open window, but again, have no idea (yet) how to do this. I'm working through some lessons on scripting, but am very early in the tutorials.

Many thanks to both of you for your prompt feedback.

If you don't want the portal to show a blank row, then deselect the "Allow creation of records ... " option. That leaves only the problem of preventing users from creating portal records without filling the address field. This could be handled as shown in the attached demo.

AddPortalRecord.fmp12

 

57 minutes ago, St3v1e said:

I noticed also that this created a one-to-one relationship and not one-to-many - is that correct?

No, it is not. It looks like you are validating the foreign key field as unique - which of course it cannot be, if a parent is allowed to have more than one child.

 

 

  • Author

Comment, yes you are correct I am validating the foreign key. I'll go back and change that and check your demo file. Thanks

 

  • Author

Steve - it works fine for me. Actually just what I was looking for (thanks to Comment for the example), but now that you introduced me to the idea of a Pop Open window, I'm looking into how I can make that work too.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.