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

Tab within same portal (instead of going to another object)


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

Recommended Posts

Posted

I decided I'd try something clever, I'd create a one line portal, let's call it Portal New, that would just be used to add records. I filtered this portal so it would only show records that were being entered since there are script triggers that commit the record as it goes to refresh other portals on the layout. Under this portal is another one that shows all the records that have been entered. We'll call it Portal All. You can edit records in Portal All.

What my problem is, is when you're using Portal New to enter a record once you get to the last field and tab out of it, it goes to Portal All instead of staying within Portal New and just going back to the start field so you can enter another record if you need to.

I tried adding a script to the last field in Portal New that selects Portal New then goes to the first field, which it does but then after the script ends it tabs to the first field in Portal All.

Any ideas what I can try?

Posted

Nice trick i made a simple test of your idea and its works fine.

I had a simple script

Set Field [ portalNew::flag ; "" ] // flag is used in the relation to portalNew and will be set to '1' when data is entered

( you will have some other filter method for your two portals)

Commit Records

Go to Field [ portalNew::field1 ]

the script can be run by a script trigger on either OnObjectValidate or OnObjectSave on portalNew's last field.

Posted

Thanks Kilyaaan

Any chance of posting a little sample file? I thought it could have been the way I set up the portals and the filters so changed things around a bit and still no luck. Originally I had the portals based off the same TO so created another one for the New portal. Again, using the debugger, I see the script runs fine, jumps into the first field, but then when the script finishes, it jumps to a field in the other portal.

I was thinking if I had a look at a sample with your set up I could work out what was different with mine.

I have to admit, it's kind of annoying. I've looked at a few things I thought may be the issue but I reckon I'm missing something small.

Posted

Well i understand you're annoyed - I was at home when i made the previous post. And now at work - I made a fresh example, and it has the same flaw as yours. :-/

After the trigged script is run, Filemaker takes over and finish leaving the trigger field and moves to the next field in the tab order, no matter what!

I'll be home in a couple of hours, so maybe I'll figure it out.

--- Actually i got a copy of it on my ipad, - I tested a few other things as well this morning.

just tested it - The really annoying thing is that now the modified file on my ipad has the same problem - arrgghh.

Lets hope I can reverse and remove all the completely other stuff i added, so we can find the stone of wisdom when i get home.

Posted

Well, if you can't beat 'em, screw with their minds...

I still have go this working the "tidy" way I want but I have got it to work. I added my NewFlag to the portal and set it so it could be edited and the tab stop position is the last in the portal. Once the last editable field has been exited (this can be left blank), the script updates the NewFlag field to "". It then jumps to the NewFlag field which has a script trigger than fires On Enter to go to the first field.

It's not elegant, it's not really tidy (fields in the portal that shouldn't be there) but it works and the user doesn't know.

It's a real interesting problem so thanks for banging heads with me Kilyaaan :laugh:. It'll be good to see if there's a tidier solution.

Posted

MAGIC!

Many thanks mate. And thanks for the quick reply's. That Halt Script step is interesting. Didn't even though it existed.

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