ssimons Posted October 17, 2005 Posted October 17, 2005 I'm pretty new to FMP. Is there a way to create a script based on the layout your in? An example would be I have several tables (all with layouts created for them) that all have a New button on them, based on which layout you're coming from I would like to choose which new screen to go to. Hopefully, I'm explaining that right.
ssimons Posted October 17, 2005 Author Posted October 17, 2005 aholtzapfel clued me in to use Get(layoutname). Thanks again.
Zero Tolerence Posted October 17, 2005 Posted October 17, 2005 Yes, you can do If Get(LayoutName) = "blah" Or, you can make use of script paramaters. Have each button perform the same script but just send a different paramater each time. I actually suggest using Script Paramaters as much as you can. Once you really get used to them, you can find all kinds of great uses for them.
ssimons Posted October 18, 2005 Author Posted October 18, 2005 Hey there ZT! Thanks for the info. Could you give me a little more on how I can use the script parameters? Would I need to then have a separate script for each button passing the parameter then running the universal script or could it be combined into one large script?
mr_vodka Posted October 18, 2005 Posted October 18, 2005 If most of your script steps are the same except for what layout you are going to bring the user to, then use one script with a different script parameter attached to each button calling the script. Then in your script just have an If statement that brings you to a certain layout based off your Script Parameter.
ssimons Posted October 18, 2005 Author Posted October 18, 2005 I don't mean to sound dumb, but I guess I am in this area. How can I attach a parameter to the button? I know I could use the first line of the script to set variable then run the script based on that variable, but that would mean creating multiple scripts and that's what I was trying to prevent. Am I just missing something?
Inky Phil Posted October 18, 2005 Posted October 18, 2005 when you asign your script to your button you will find a field at the bottom of the window that will allow you to enter a script parameter Phil
ssimons Posted October 18, 2005 Author Posted October 18, 2005 (edited) Thanks Phil. Would you believe me if I said I never (well, never being over the last month) noticed that before. Can you tell I still have a lot to learn and my boss wants me to be the sole FMP developer for our company. Lucky for me, and everyone at our company, our main database runs on progress. Sarah Edited October 18, 2005 by Guest
Inky Phil Posted October 18, 2005 Posted October 18, 2005 No probs. I am still learning myself so I know the feeling only too well. The people in here are really helpful though - and patient thank goodness Regards Phil
ssimons Posted October 18, 2005 Author Posted October 18, 2005 I was so glad when I stumbled upon this site yesterday looking for help on the internet. I felt like I was never going to get anything accomplished because I had been working on the same problem all of last week. It's hard without a support group, but thanks to you all I feel like I have one now. Thanks again Phil, John and ZT for all you help and hopefully you all won't get tired of me and my questions too quickly.
Recommended Posts
This topic is 6978 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