Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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)

 

 

Posted

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)
Posted

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.

  • 2 weeks later...
  • Newbies
Posted

>> 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)

Posted

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.

This topic is 3889 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.