May 23, 20214 yr [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. Edited May 23, 20214 yr by St3v1e Add screenshots
May 23, 20214 yr 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?
May 23, 20214 yr 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.
May 23, 20214 yr 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? 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.
May 23, 20214 yr 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.
May 23, 20214 yr 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
May 24, 20214 yr 15 hours ago, comment said: AddPortalRecord.fmp12 148 kB · 3 downloads Sample doesn't seem to work. Says <Table Missing> when running the script.
May 24, 20214 yr 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