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

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

Recommended Posts

Posted

I am creating a new recipe in a portal on the persons layout. Only the name of the recipe is created. From here I want to go to the layout where information is added.

I have tried a script attached to button:

Commit records/request

Go to related record (show only related records) also tried it without show only

The script takes me to the correct layout but always to the first record.

Seems to me that I may need to do a find, but have failed to create a find that picks up the recipe name and finds itself in the layout.

The portal is in the layout of the person creating the recipe and is related through the person key.

Posted

Once you Commit (I assume you mean Exit Record/Request, since your profile shows version 6), you are no longer in a portal row. So going to the first related record means the first related record for the person.

If commitment is an issue, try setting a global number with Status(CurrentPortalRow), then Exit Record/Request, Go to Field [any one in the portal], Go to Portal Row [based on global number field], then Go to Related Record [show only related, relationship].

Posted

I have never done this.

So I tried and failed with this script.

Set field [Get ( PortalRowNumber )]

CommitRecords/Request

Go to Portal Row [select; no dialogue; Recipe::Portal Row Number_g]

Go to Related Record

Posted

You don't have a field specified to set with Get(PortalRowNumber). If there is more than one portal on your layout, first Go to Field [relationship::field] for one that is in the portal, and then Go to Portal Row and GTRR [show; relationship].

Posted

Ok I have added Go to Field

Go to Field [Recipe::Portal Row number_g]

Set field [Get ( PortalRowNumber )]

CommitRecords/Request

Go to Portal Row [select; no dialogue; Recipe::Portal Row Number_g]

Go to Related Record [show only related records...

I end up in the layout but still at the first record.

Posted

No, look at the order of the steps in my first post.

You are assumably in a portal row when the button is clicked, correct? So you

Set Field [Recipe::gPortalRowNumber; Get(PortalRowNumber)]

Commit Records/Requests

Go to Field [any related field in the portal] <- gets you back into the portal

Go to Portal Row [select; no dialog; Recipe::gPortalRowNumber] <- gets you into the right row

Go to Related Record [show; relationship]

Posted

Where is the button located? Within each portal row?

It is a good habit not to use spaces. Use underscores _ if necessary. When you put your data online, it will make things much easier.

Posted

Not necessarily. It just utilizes less space.

Here's a version using a script parameter instead.

Make sure that the Go to Field step specifies a field that is actually in the portal, not just related.

Test2.zip

Posted

Hmm, so it does. I would suspect that is not intentional functionality though, and wouldn't rely on it in case it's fixed later on.

If you get to the end of your wits, feel free to stuff your file and attach it here. Maybe we'll see something that isn't obvious.

Posted

Good Morning

I noticed another difference in our test and my application.

Your relationships in the test are many to many where mine is a one to many relationship.

attaching a snapshot of the table graph

Posted

Hi

Tried out your suggestions in the secont test file using the script patameter and it worked.

Thank you ever so much for your assistance.

I'm looking forward to the day when I understand why it has worked.

Posted

I don't know how to change the TO diagram to show only one-to-many. Can that even be done? Mine defaulted to many-to-many.

Posted

Not necessarily strange, but not the most common. I have no idea what criteria FM uses to determine which type it should be. But that shouldn't have any bearing on how it behaves if there ends up being only one parent record for each child.

Posted

Queue, Gary,

I learnt this one recently. The TOG will show a one to many instead of a many to many if the key is defined as an auto-entered serial number, it is set to be unique, or it is a global.

Posted

Thanks Ender. That makes sense, too. My examples usually use an auto-entered calculation of Get(RecordID) instead of an auto-entered serial.

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