SaturdaySoftware Posted November 28, 2008 Share Posted November 28, 2008 [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? Link to comment Share on other sites More sharing options...
Raybaudi Posted November 28, 2008 Share Posted November 28, 2008 Hi welcome to the best Forum of the web ! Your script lacks a step, before going to $Portalrow: Go to Layout [ original layout ] Link to comment Share on other sites More sharing options...
SaturdaySoftware Posted November 28, 2008 Author Share Posted November 28, 2008 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 Link to comment Share on other sites More sharing options...
Raybaudi Posted November 28, 2008 Share Posted November 28, 2008 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 ] Link to comment Share on other sites More sharing options...
SaturdaySoftware Posted November 28, 2008 Author Share Posted November 28, 2008 Hi Daniel, my code in Filemaker looks just like yours. Still does not work....... Link to comment Share on other sites More sharing options...
SaturdaySoftware Posted November 28, 2008 Author Share Posted November 28, 2008 (edited) 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, 2008 by Guest Link to comment Share on other sites More sharing options...
Fenton Posted November 28, 2008 Share Posted November 28, 2008 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. Link to comment Share on other sites More sharing options...
Raybaudi Posted November 28, 2008 Share Posted November 28, 2008 Ah... you didn't say that you have more than a portal in the original layout ! Link to comment Share on other sites More sharing options...
Fenton Posted November 28, 2008 Share Posted November 28, 2008 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. Link to comment Share on other sites More sharing options...
SaturdaySoftware Posted November 28, 2008 Author Share Posted November 28, 2008 "he may already have the Go To Field before the Go to Portal Row" Yupp...... :) Link to comment Share on other sites More sharing options...
SaturdaySoftware Posted November 28, 2008 Author Share Posted November 28, 2008 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? Link to comment Share on other sites More sharing options...
Fenton Posted November 28, 2008 Share Posted November 28, 2008 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. Link to comment Share on other sites More sharing options...
SaturdaySoftware Posted November 29, 2008 Author Share Posted November 29, 2008 (edited) 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, 2008 by Guest Link to comment Share on other sites More sharing options...
IdealData Posted November 29, 2008 Share Posted November 29, 2008 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. Link to comment Share on other sites More sharing options...
LaRetta Posted November 29, 2008 Share Posted November 29, 2008 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. Link to comment Share on other sites More sharing options...
SaturdaySoftware Posted November 30, 2008 Author Share Posted November 30, 2008 Now this sounds realy promissing. Thank you for your help!! Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5768 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 accountSign in
Already have an account? Sign in here.
Sign In Now