March 17, 201411 yr Hello I created a portal table which i want to enter some data of a person in it. I see the tables are there, I set "Allow to change" in relation table. whenever I click my script, instead of creating a new record in that portal, my script goes to that layout and stays in. here is my code, (LAB is the portal table) FreezeWindow Go to Layout (LAB) commit record (skip data entry validation/no dialog) Go to Field (LAB: 1st field) Go to Portal row (select;last)
March 17, 201411 yr There are basically two methods to create a relate record: 1. Set the relationship to “Allow creation of records …” and use the spare last row in a portal to add a related record. 2. Use a script to store the primary key of your current table, go to a layout of the other table, create a new record, set the foreign key to the value of the stored primary key, return. (You wouldn't even need a portal for that). The problem with your script is that you mix up these two methods. When you go to the other table and layout (LAB), there is no portal – it's on the layout you just left. Give your portal an object name in the Inspector, then use Go to Object ( yourPortalObjectName ) Go to Portal row ( last ) # no select Go to Field (LAB: 1st field)
March 17, 201411 yr Ditto to what Eos has written, above. I would just add that for approach 1, the fields belonging to the related record do not neccessarily need to be in a portal -- if there is no possibility that there will be more than one related record to the current table. Without the portal, the related fields will just display data from the first matching record, and you'll not be able to see any other related records.
March 30, 201411 yr Newbies >> This is a question relating to the above solved issue. If my layout is a single window approach and i am representing my different child tables in tabs in the main layout, how do i data entry without leaving the main window? Any help will be highly appreciated HAF (a newbie)
March 31, 201411 yr Hi Haf, welcome to FMForums! If you are using tabs on the main layout then Users can just click the tab to jump to the different tabs. There is no need to go to a different window or layout. If you have further questions, just ask! :-) However, if there are many child records to the single parent record, your child records on those tabs would need to be in portals to show the 'many' child records.
Create an account or sign in to comment