Jump to content

What is a control script step?


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

Recommended Posts

Ok so I was reading something here about Get(LastError) and so I was looking it up and help said

 

"When you perform a script that uses this function with control script steps, the control script steps do not clear the last error condition reported by FileMaker Pro."

 

so my question is what is a control script step?  I have looked everywhere for a meaning and when I view the script steps, there is no 'control' section for the steps so I do not know what this quote above even means. Can someone explain it please or provide an example?  Thank you.

Link to comment
Share on other sites

Thank you.  I think FM Help is terrible in searching here is the result I had gotten when trying to find the answer

 

As for that popup, I had never noticed it before.  :shocked:  I appreciate your help and now reading it again and knowing control script steps it makes more sense I think.

post-105311-0-98506100-1427520673_thumb.

Link to comment
Share on other sites

Hi Charity,

 

I only infrequently find myself searching Help (just my approach, maybe).  Instead, I keep the main FM Help page bookmarked (which has direct links to Script step, etc. reference sections), as well as keeping more direct bookmarks to reference pages for functions, script steps, triggers, error codes, etc.  Comes in very handy for looking up the expected or returned values for functions I don't use as often, not to mention those all-important error codes!

 

hth,

 

Mark

Link to comment
Share on other sites

Hi Mark,

 

That is a nice tip.

 

I’ve been using this method to access the Online Help using the URLs for a few years now, the biggest reason I adopted it was the increase in speed to get to what I was looking for, compared to the built in FileMaker Help. In addition, I hate the that the built in wants to be on top of my work. 

 

I also have 11 and 12 Helps bookmarked too.

 

Lee 

Link to comment
Share on other sites

Thanks guys that helps me.  I have now bookmarked your link Mark thank you.  Many times I search help for things that are there but they do not come up.  And google gives me too many results which are irrelevant.  Searching here is not much better than Help sorry to say because I love this website otherwise.

 

Comment, what did you type search to find Control script steps?  I see that "control script" does work but so should "control script step" and it does not.  I am looking for the secret on what works in searching and what does not.  It amazes me how many times searching Help fails only for me to find the exact phrase later by accident.  Can I make search more global so it works better?  Are there any secrets to finding information I need?

Link to comment
Share on other sites

Comment, what did you type search to find Control script steps?

 

I never search the help, because the built-in help is too slow on my computer and the online help cannot be searched.

 

Well, not easily, anyway. Suppose you enter this into Google's search box:

control script step site:http://www.filemaker.com/help/

I believe this will be your first result:

http://www.filemaker.com/help/12/fmp/html/scripts_ref1.36.1.html

  • Like 1
Link to comment
Share on other sites

It works perfectly.   :laugh2:

 

This will save me so much heartache in searching help and I will use this all the time.  I have it as a Stickie.  

 

Does anyone know how to delete a Stickie once I create it?  I have a hundred of them now and they all display at once and many of them can be deleted but there is no way to delete them.  This is on my new Mac laptop with Maverick. I select the one I want to delete and go to Edit but the delete is grey.  I have tried everything.

Link to comment
Share on other sites

On control script steps may I ask one more question please

 

If I have the following script, which may not be logical but it helps me understand

 

Set Field [ this field ; a value ]

Loop

Get(LastError)

 

then if error happens in Set Field, the fact that the Loop is there and it is control step does not replace or remove an error if it happened on the Set Field.  Is this what it is meaning?  That control script steps do not produce errors themselves so they do not stop a prior error.  Hard to explain.

 

Here is my fear - that I will depend upon getting a last error and something will interfere.  I still have to test sub scripts because I am afraid they will not act like control steps and they will not pass errors back to main script but I have not test that yet.  Somebody just responded here, I got a message, so I will stop now.

Link to comment
Share on other sites

Thank you Doug.  When I hovered top left it just turned into resize bar instead.  I see now that if I ignore the resize indicator and click it asks to delete.  I guess Mac thinks dual purpose is okay but it is not good.  Why not put an x next to it.  

Link to comment
Share on other sites

If I have the following script, which may not be logical but it helps me understand

 

Set Field [ this field ; a value ]

Loop

Get(LastError)

 

then if error happens in Set Field, the fact that the Loop is there and it is control step does not replace or remove an error if it happened on the Set Field.  Is this what it is meaning?  will not pass errors back to main script but I have not test that yet.  Somebody just responded here, I got a message, so I will stop now.

 

Yes, that's what it means. You could actually test this by calling a script step that's known to produce an error, for example:

Set Field By Name [  ]

followed by:

Loop
 Exit Loop If [ 1 ]
End Loop
Show Custom Dialog [ Get ( LastError ) ]

As opposed to:

Set Field By Name [  ]
Loop
 Select Window [ Current Window ]
 Exit Loop If [ 1 ]
End Loop
Show Custom Dialog [ Get ( LastError ) ]

where the Select Window[] step will overwrite the LastError register.

Here is my fear - that I will depend upon getting a last error and something will interfere.

 

You can always store the last error in a variable for later use.

Link to comment
Share on other sites

... the online help cannot be searched.

 

Well, not easily, anyway. 

 

I don’t understand what you mean. I search the “Content” using Safari all of the time and I don’t see a problem.

Link to comment
Share on other sites

So then you have to click on the topic and it will open it up.

 

PS,  Do you have a way of searching the contents in some other way, or have a FileMaker file with the  help information, where you can search everything?

Edited by Lee Smith
Added PS
Link to comment
Share on other sites

but the speed is so much slower when compared to Safari

 

Well, yes - that's what I said from the start. You can't have your cake and eat it too. Though I guess searching the TOC will get you the wanted result 99% of the time.

 

 

 

and it wants to be on top.

 

Now that should be solvable by overwriting the application's defaults, using the terminal.

Link to comment
Share on other sites

This topic is 2802 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
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.