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

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

Recommended Posts

Posted

Hi all,

This is what I'm triying to do. I will kick myself when there is a simple solution, I'm searching for days now. What am I overlooking?

On my layout there is a TabControl object. One panel is called "Medewerkers" (dutch for Employees) and another panel is called "Details"

On the panel "Medewerkers" is a portal with all the Employees of an organisation. (relationship one to many). I'm looking for a way that when clicking on a name in the portal the layout switches to the Details panel and shows the right related (Employees)record.

Right now it is displaying the first record form the relationship "organisation" -> "Employees". (the first employee)

I've tried to make a TO with the relationship id -> id (one on one) and by lastName -> lastName (one on one) but setting the fields to the SelfJoined TO FM displayes the message that it is not possible to show the data with this lay-out.

Changing the layoutsettings to show records from "Employees" displays the Details Panel right but other regions on my layout are wrong in that case.

Somebody knows a solution? Ofcourse I can create a duplicate layout, go to that layout by script and return to the original layout when I leave the TabControl panel but I want to make as less layouts as. Is it possible to script the "show records from" setting?

Hope to hear....

Regards,

Adri

Posted

clicking on a name in the portal the layout switches to the Details panel and shows the right related (Employees)record.

Use the Go to Related Record[] script step.

Posted

Thank you for your reply.

I've tried the GoToRelatedRecord [] scriptstep but FM prompts me with a dialog that the result not can be displayed by this layout.

Tried it in different ways, with different TO's : Employees, Employees Details but all with the same result.

Any other suggestions?

Thanks.

hth

Adri

Posted

Ah, sorry - I missed the part about showing the selected record in another tab panel. You will need another relationship for this. What is your parent table?

Posted

The parent table is (I'm building a solution to manage graveyards in The Netherlands) "Begraafplaatsen" (graveyards).

I have set up a relationship with a child table called "Medewerkers" (dutch for Employees. The relationship is a one to many based on the unique ID filed in the parent and a ID_begraafplaatsen field in the child table.

I also tried to make a second TO of table "Medewerkers", called "Medewerkers Detail" with a one to one relationship on the unique ID field of the "medewerkers" table (id->id). I've scripted a find on the unique ID and a gotoObject 'Details" but then the meesage displays that it is impossible to show the result on this lay-out. Then I changed the fields on the detailsPanel from "Medewerkers Detail" to "Medewerkers" but then it simply shows the first related record and do nothing with the find (changed the findscriptstep too ofcourse)

One of my tabpanels is showing a portal with some fields of the child table "Medewerkers". that works fine.

It would be great if its possible to switch to another tabpanel (by clicking the portal row) displaying the details of the record I was clicking on without making an extra lay-out with different "show records from" settings.

Maybe this is important: I'm using an external datasource and an appfile. In the appfile is all the logic and UI elements. In the datafile ONLY the data is stored.

Help is much appreciated

Regards,

Adri

Posted

Assuming the following relationship:

Graveyards::GraveyardID = Employees::GraveyardID

add a global field gEmployeeID to the Graveyards table, and define a second relationship:

Graveyards::gEmployeeID = Employees 2::EmployeeID

and place fields from Employees 2 in the "Details" tab.

The script needs to set the gEmployeeID field to Employees::EmployeeID and go to the "Details" tab.

Another option is to use a filtered portal based on the existing relationship.

Posted

THIS WORKS GREAT!!!!

Thank you very much. It's just what I want.

Searching and posting on this forum helps me to gain more and more knowledge about FM.

Yhanks again!

Adri

Posted

Oops.... a little problem.

Going to a related Employee and adding a new Related Employee works great as mentioned.

However when I switch to another graveyard and clicking on the details tab the last visited Employee record is showing.

What can I do to avoid that?

I've tried to add a script to the paneltab to display a message that the startingpoint is the tab employee but that script will only runs after a second click. (first click selects the panel, second dlick activates the script and thats to late because the wrong record is visible already.

Don't know what to do. Can you help me out here? I can clear the Gobal field gEmployeeID in the Graveyards table but the result is an empty record at editing an existing record, adding a new record.

hth

Posted

Oops.... a little problem.

Going to a related Employee and adding a new Related Employee works great as mentioned.

However when I switch to another graveyard and clicking on the details tab the last visited Employee record is showing.

What can I do to avoid that?

I've tried to add a script to the paneltab to display a message that the startingpoint is the tab employee but that script will only runs after a second click. (first click selects the panel, second dlick activates the script and thats to late because the wrong record is visible already.

Don't know what to do. Can you help me out here? I can clear the Gobal field gEmployeeID in the Graveyards table but the result is an empty record at editing an existing record, adding a new record.

hth

Soory, but found it.

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