November 28, 200817 yr [color:brown]Set variable [ $Portalrow; Value:Get( PortalRowNumber )] Go To related record[ bla, bla Go to Portal Row[select; $Portalrow ] Seems straight forward. My logic: Where was I?, change to different record, move to the row in the portal where all this started of. Doesn´t work as expected! Does work if I leave out the step [color:brown]Go To related record[ bla, bla. The variable contains the correct value (i.e. 34) but the [color:brown]Go To related record[ bla, bla seems to reset the rowcount to 1. So I get an error since I am trying to reach a row > 1. Any ideas?
November 28, 200817 yr Hi welcome to the best Forum of the web ! Your script lacks a step, before going to $Portalrow: Go to Layout [ original layout ]
November 28, 200817 yr Author Hi, that's not the problem. The "Go To Related Record" step includes which layout to use. I already tried the "Go to Layout" but it doesn't change anything. Regards from germany, Robert
November 28, 200817 yr Please, try before ! Set variable [ $Portalrow; Value:Get( PortalRowNumber )] Go To related record[ bla, bla [color:red]Go to Layout [ original layout ] Go to Portal Row[select; $Portalrow ]
November 28, 200817 yr Author Hi Daniel, my code in Filemaker looks just like yours. Still does not work.......
November 28, 200817 yr Author Daniele, I just figured it out.. After the [color:brown]Got To Related Record[bla, bla... I added a [color:brown]Go To Field[bla, bla... Edited November 28, 200817 yr by Guest
November 28, 200817 yr You should use the step Go To Field [ related::field ] BEFORE you use Go to Portal Row. Yes, the order of steps seems backwards, but it is important. Otherwise if you have more than 1 portal on the layout FileMaker will not know which one when you issue Go to Portal Row (the back most, usually 1st created, is the default). It works fine, because the cursor stays in the field specified, no matter which portal row you go to.
November 28, 200817 yr Ah... you didn't say that you have more than a portal in the original layout !
November 28, 200817 yr Actually, rereading his post, he may already have the Go To Field before the Go to Portal Row; but it is not clear. I just thought I'd point it out, as a best practice.
November 28, 200817 yr Author "he may already have the Go To Field before the Go to Portal Row" Yupp...... :)
November 28, 200817 yr Author Another problem is as follows. I have a couple of portals on a TAB-CONTROLL how can I figure out (manage scripts) which TAB is showing?
November 28, 200817 yr You can name each tab, using the Object Info, Object Name box. Then, when returning to the layout, via a script, you could return to a specified tab, or to do a tab stored within a Variable or global field. Some people have created fairly elaborate generic methods to capture and restore the foremost tab(s). I haven't, yet.
November 29, 200817 yr Author Hi Fenton, naming the object seems like a good thing, but how can I figure out with of 8 Tabs is showing? Is there a way to figure out which one of the Tabs is the activeone? Assuming Tabs are named "TAB1" through "TAB8". Can't find anything on the net. Edited November 29, 200817 yr by Guest
November 29, 200817 yr As you are using scripts to control access through the tabs then set up a global variable ($$current_tab) when executing in the navigation script to be the name of the selected object name. Now you know which tab your are on.
November 29, 200817 yr Check out FM Help on the GetLayoutObjectAttribute function. Note specifically the HasFocus and IsFrontTab options. A combination of naming your objects and using these functions allows high degree of control.
Create an account or sign in to comment