February 17, 200619 yr Is there a way to perform a script based on resulting text from a drop down menu? Ex: if a drop down menu results with the text "Refinance", perform said script. Otherwise, do nothing. I can't use a button for the Field, being that it is a drop down menu (there are other text results that I don't want a script performed) and I don't personally know if there is a way to make it an auto-calculation to run a script based on the drop down result. Any ideas?
February 17, 200619 yr I don't personally know if there is a way to make it an auto-calculation to run a script based on the drop down result. Well I know you can't ...unless you install an event trigger plugin. But it could be that hardly would need it anyway. What is the script doing?? Checkout: http://www.newcenturydata.com/downloads/checkbox_control.zip --sd
February 17, 200619 yr Yes, you can but you need a plugin like, for example, EventScript. You need to make this calculation as an AutoEnter/Replace calc of the field "text": text & Case( S4HU_EventScript( Get(NomeFile) ; text ; "") ≠ "?";S4HU_EventScript( Get(NomeFile) ; text ; ""); "" ) If the field "text" contains a valid script name, the last will fire.
February 17, 200619 yr Author Let me start by saying that the field name is "REASON". This field is a Drop Down with a Value list with many values. This is the logic behind how I want the script to work (it isn't written yet) If REASON = "Refinance", go to layout "Loan", otherwise do nothing. I don't want the script to run if another value is selected from the drop down. It should only work if "Refinance" is selected. I know that didn't answer your question directly, but it was difficult to do that, since I don't know exactly how to solve the problem. Did that clarify the delima? I guess what I'm looking for is a way to imbed running a script based on a calculated value. (however, you're the master & I'm the grasshopper. I'm open to anything that will solve the problem I stated.)
February 17, 200619 yr Author That's what I was afraid of. I've never used any Plugins before, but I guess I'll have to learn, eh? I'll look in to that and hold on to the calculation you wrote. Thank you VERY much for your help!
February 17, 200619 yr So you have to make: 1) A script Refinance: Go to Layout ["Loan" (your DB)] 2) A value List that contains the word "Refinance" 3) A field REASON with this calc into the AutoEnter/Replace option: REASON & Case( S4HU_EventScript( Get(FileName) ; REASON ; "") ≠ "?";S4HU_EventScript( Get(FileName) ; REASON ; ""); "" ) Edited February 18, 200619 yr by Guest correction of the get(FileName) function
February 17, 200619 yr Author That should do the trick! Writing the script wasn't the problem. What you cleared up for me was the calculation issue...which was that I need to get that plugin. After getting the plugin, I probably would have come right back to find out what to do with it, but you answered that too. You've been a huge help. Thanks again!
February 17, 200619 yr Author Quick question about your script (forgive my ignorance)... 1. Does Get(NomeFile) mean the Table, The actual Database file name or the script name? 2. What is supposed to be typed in place of "?" (field name? Script Name? etc.) Thanks.
February 18, 200619 yr 1) Get(FileName) is the right function to call there ! That was a mistake due to my copy of FM that is setted for Italian language 2)Inside those "" can be placed a parameter to pass to the script. It can be reached with the Get(ScriptParameter) function
Create an account or sign in to comment