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

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

Recommended Posts

Posted

Simple question:

field name : Account type

script logical criteria:

if(account type="commercial"),

perform script[" without phone numbers']

else

perform script [" with phone numbers']

end if

That is the construction that the script has. And it works!

Now, when I change it to:

                                         if(account type="walk-in"), _ or any other between quotes

                                         perform script ["without phone numbers"]

                                         else

                                          perform script [" with phone numbers"]

                                          end if

 

Well, that constrcution doesn't work.

 

Could anybody give me a hint. I recovered the file, just in case and it still doesn't recognize the instruction.

Really weird. It should be simple, but I can't get it to work.

Running fm 11

thank you very much

 

 

 

 

Posted

Did you type this or copy it from a printout of the scripts?

You have a lot of spaces in the code.

On the Mac, you can print your scripts to Preview, and then copy that and paste it into the body of your questions.

or attach a copy of your file so we can see it in context.

Lee

 

Posted
2 hours ago, nad1 said:

Well, that constrcution doesn't work.

`Please explain exactly what "doesn't work" mean. What does the field contain, and what happens when you run the script?

Posted

Thank you guys for replying.

Here's the script:


Go to Layout [ “TICKET DE VENTA” (AMPY REGISTER) ]
If [  AMPY REGISTER::Account TYPE ="comercial" ]
Perform Script [ “with phone#” ]
Else
Perform Script [ “without phone#” ]
End If

The intention is that if the account type is filled with the word "Comercial", the script will not prompt the user to input a phone number which with else would be necessary to input a phone number.

I hope this clarifies what apparently I didn't make clear before.

Thanks again

Nelson 

forgot to say that, if I replace "Comercial" with other kind of account, ie "walk-in" the script will prompt the user to input the phone number which is not intended in this script. it does it with "comercial" but not with "walk-in"

 

Posted

I am sorry I can't explain it better.  Thanks anyway for the effort!

Posted

Can you attach a copy of your file (remove any confidential info) or a no-record clone.

Lee

Posted

It sounds like the script is doing just what it looks like:  when it's "Comercial" it runs the first sub-script, otherwise it runs the other sub-script.

If that's not what you intend, then what do you want?
Do you want "walk-in" to also run the first sub-script?
Or do you want the second sub-script (without phone#) to do something different?

Posted
On 5/17/2016 at 11:44 AM, nad1 said:

if the account type is filled with the word "Comercial", the script will not prompt the user to input a phone number which with else would be necessary to input a phone number.

if I replace "Comercial" with other kind of account, ie "walk-in" the script will prompt the user to input the phone number which is not intended in this script. it does it with "comercial" but not with "walk-in"

Hi Nelson,

Your first script examples are opposite your second script examples.  It might help to rename your scripts to clearly indicate your expectation, such as:  Require Phone# versus Skip Phone#.  It would clarify the script intent.

The field may also fail to match "walk-in", which is why Comment rightfully asked what the field contained.   When you use = this means that the value in the field must match exactly and only contain "Walk-In" and will fail if there are spaces, if other words exist within the field, or if multiple values exist in the field such as a list.

Posted

Thank you for your reply. This kind of script should be as easy as 1,2,3 but still I am not accomplishing the result I am looking for.

I am self thought, so I may not be sufficiently worded in  filemaker vocabulary.

I will try to regroup myself and be clearer next time so that I can get more help from you guys.

Meanwhile, thanks a lot for your effort!

Posted

Well, if you say so... I wish I knew much more about Descartes.

Any similarity is pure coincidence!

Posted
4 hours ago, nad1 said:

I wish I knew much more about Descartes.

Well, if there's one thing you should know about him, it's that he said "I think, therefore I am".
And you wrote "I am self thought" (instead of "self-taught") - which brings you very close to that, I think.

Posted

ahahh

that's great !

thanks for the humor!

Happy Memorial day in the USA!

Posted

Found out that my script was not giving me the desired result because in part (i am an idiot) and because another

script was conflicting with it.

thanks all for the support.

 

cheers! ( I owed it to you to have this topic closed)

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