Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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?

Posted

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

Posted

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.

Posted

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):P 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.)

Posted

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!

Posted (edited)

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 by Guest
correction of the get(FileName) function
Posted

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!

Posted

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.

Posted

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

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