April 26, 200718 yr Hi all, I am trying to make my search/find option a little bit easier to use but it is not really working the way I would like. I have one main layout in which new records can be added and all the info is gathered. The other layouts are reports/table views of the (filtered) data gathered in the main layout. Most of the searching through that data will be done in the table views (as they give me the best overview of the data) After finding the right project/report one can click a button to go to that particular record in the main layout. Now the problem is that I would also like that to work the other way round. To make a button to go back to the previous layout (table view) and the previous selected record. While keeping the previous layout selections (filter). I am confused on how to do this, what kind of calculation can I use to make this happen?? Thanks, Dutchy
April 26, 200718 yr After finding the right project/report one can click a button to go to that particular record in the main layout I'm afraid this doesn't make sence, how would a button work in table view at all, you mean list view - don't you?? While keeping the previous layout selections (filter). I am confused on how to do this, what kind of calculation can I use to make this happen?? And I'm confused as to why it isn't just a button that make you go to other layout, what have spoiled the found set?? --sd
May 11, 200718 yr Author Sorry I mean list view. It is impossible to make just a button to go to another layout because I would like to go the previous layout or list view. which can differ every time. I have one main layout in which changes can be made and 20 secondary layouts (list views)in which no changes can be made. So I would like to be able to easily switch between them. Button to go to main layout (like the way you said) and then a button to go back to the previous layout/selection but I can't seem to make this happen. Thanks Dutchy
May 11, 200718 yr Take a look at Seedcode Backmagic: http://www.seedcode.com/cp-app/ste_cat/backmagic If you understand what they're doing you can adopt it entirely or use some basic custom functions and scripting to do something more limited.
May 11, 200718 yr Author Hi I can't seem to get it to work or don't don't really understand the concept. Adopting the concept seems extremely complicated. Isn't there an easier way?: Thanks Dutchy
May 11, 200718 yr Heres a quick way that will send you back to the last layout but not any previous ones Set up a global number field - 'lastlayout' in your navigation script from any layout that you want to go back to include the line setfield[Lastlayout;Get(layoutNumber)] Attach a script to your 'back' button with the line Go to layout (LastLayout) You do this by selecting the go to layout step, then selecting layout number by calculation then selecting the field 'lastlayout' Your back button will then always take you to the layout that you last set up with the initial setfield instruction HTH Phil
May 14, 200718 yr Author Hello Phil, Thanks for your help. However I can't seem seem to get it working properly. I set up a global Number field - "Lastlayout" than made a script: Setfield [Projects::lastlayout; Get (LayoutNumber)] and a script Go to layout (Projects::lastlayout). Made a button that preforms the go to "(last)layout" script. However when I click on this button I keep going back to the same layout and not the one that I used last. I know I am doing something wrong but am not sure what. I'll keep trying to figure it out. Any tips would be welcome. Dutchy
May 14, 200718 yr Hi Dutchy, Firstly, for your button, you should be using: go to layout number by calculation -- and in there put your global field. Secondly, given that you're on FM8.5 its probably not necessary to use a global field, try a global variable instead: 1. Save Layout Set Variable[ $$prevLayout ; Get(LayoutNumber) ] 2. Go back to layout Go To Layout[ By Calculation...] Calc being: $$prevLayout Thirdly, For something that will track multiple layouts and is a bit simpler to understand than that other example, take a look at this file i posted not too long ago: http://www.fmforums.com/forum/showtopic.php?tid/183766/post/236519/hl//
May 15, 200718 yr Hey Genx, I see that you have decided to show your real face in your avatar. Just like me! : Phil
May 22, 200718 yr Author Hi Genx, Thanks for the info, that link was really useful but I still can't seem to get this to work. How can going back to the last used layout be so complicated?? When I set up a global number field "Last layout" I always go back to the layout number that is set in that field. I do however keep the selection of the last layout I used but do not go back to that layout. I tried scripting this in the way you suggested with Set Variable. However then nothing happens. Your link gave me some new ideas but the way that it is set up seems to be impossible for what I need to do. Is there a simple way to explain the concept which BruceR showed? I can really use some more help on this one. Would it be useful to show you a simple version of my database? Thanks for all the help, I really appreciate it. Dutchy
May 22, 200718 yr Would it be useful to show you a simple version of my database? ... extremely simple yes -- with your attempt at the script.
Create an account or sign in to comment