Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

New Record in portal - unwanted blank field added.


This topic is 1346 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

[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
Posted
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?

 

Posted

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.

Posted

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.

Posted

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.

 

 

Posted

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

 

Posted

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.

This topic is 1346 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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