AA

Portal filtering and true Record number

Discussion created by AA on May 20, 2017
Latest reply on May 20, 2017 by philmodjunk

Hello,

 

I am facing some issue with my solution so, a little help really need.

 

filemaker.jpg

 

I have a Table that includes all contact records of Companies and Persons and classified by categories (CompanyCat = 1, PersonCat =2)

I would like to create a Tab when user can switch between Person or Company. I have solved it by two Portal in the same Layout by using self-join and each portal has been filtered according to its categories and joined with "X" relationship. So far, it works. The issue starts when I would like to pick one row and get the real ID and copy that into a Global field. I have used the following four script variations:

 

Global field = Globals::ActiveRecord

ID = Contact::ID

 

Set Variable $ActiveRecordID; Value:GetNthRecord (Contact::ID;GetField (Contact::ID))]
Set Field [Globals::ActiveRecord; $ActiveRecordID]
Commit Records/Requests[]

Result : ActiveRecord: "?" I have got a question mark.

 

Set Variable $ActiveRecordID; Value:GetField (Contact::ID)
Set Field [Globals::ActiveRecord; $ActiveRecordID]
Commit Records/Requests[]

Result ActiveRecord: "?"  I have also received a question mark..

 

Set Variable $ActiveRecordID; Value:Get(ActivePortalRowNumber)
Set Field [Globals::ActiveRecord; $ActiveRecordID]
Commit Records/Requests[]

Result: ActiveRecord: When I click on a row under the Company tab I got 1,2 or 3 but not 4,5,6,because the portal is filtered and the main table isn't that's why FM couples with the true ID. It does make sense.

 

Set Variable $ActiveRecordID; Value:GetLayoutObjectAtruute("ContactID1", "content")
Set Field [Globals::ActiveRecord; $ActiveRecordID]
Commit Records/Requests[]

ActiveRecord: "empty" Some reason it did not reach the field, but weird because it works with "objectType".

 

Any idea what to do? Better to use separate Tables for Company and Person?

 

Regards,

Andras

Outcomes