Jump to content

Go to previous layout selection


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

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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//

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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