October 17, 200520 yr 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.
October 17, 200520 yr 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.
October 18, 200520 yr Author 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?
October 18, 200520 yr 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.
October 18, 200520 yr Author 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?
October 18, 200520 yr 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
October 18, 200520 yr Author 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, 200520 yr by Guest
October 18, 200520 yr 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
October 18, 200520 yr Author 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.
Create an account or sign in to comment