Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

can someone help me, with a way of finding the  internal script ID

craig

Please update your Profile to reflect the Version of FileMaker, OS and Platform you are using.

I dont think that the internal Id of a script is exposed anywhere.

The only place i can think of is the DDR.

The important thing is... what problem are you experiencing that would be solved by knowing a script ID?

18 hours ago, kiwioz said:

can someone help me, with a way of finding the  internal script ID

 

Given the name of a script, you can use the Design functions to work out where its name appears in the List of scripts and knowing that, deduce its scriptID - because it appears at the same level in a List of all your script IDs.  Or use this calculation:

Let ( [

WantedScriptName = "MyScriptName" ;     //  <-- the name of your script goes here
AllScriptNames = ScriptNames ( "" ) ;
AllScriptIDs = ScriptIDs ( "" ) ;
PositionOfScript = Position ( ¶ & AllScriptNames & ¶ ; ¶ & WantedScriptName & ¶ ; 1 ; 1 ) ;
Nth_Item_In_List = ValueCount (Left(AllScriptNames ; PositionOfScript)) ;
ScriptID = GetValue ( AllScriptIDs ; Nth_Item_In_List ) ] ;

ScriptID )

 

Ralph

 

Hi Ralph,

That works! :)

18 hours ago, kiwioz said:

can someone help me, with a way of finding the  internal script ID

This is the first time I  have seen this request and I too wonder why are you need this information.

Hi kiwioz,

Knowing the internal ID can come in handy in many situations which can eliminate possibility of indirection, thus eliminating need to hard-code.  There are custom functions which are quite useful and can be used to get the internal ID of fields, layouts, etc.

The attached file holds a custom function by Fabrice Nordmann.  He and others have created these multi-purpose custom functions to handle your need.

ScriptID.fmp12

BTW, knowing the script ID is helpful if you are testing for the current running status of another script and you do not want to hard-code the script name.

Edited by LaRetta

5 hours ago, Kris M said:

The only place i can think of is the DDR.

I just did a DDR on one of my files (scripts only) and don’t see this information on it.

36 minutes ago, LaRetta said:

The attached file holds a custom function by Fabrice Nordmann.  He and others have created these multi-purpose custom functions to handle your need

Here is the link to the CF LaRetta is using,

http://www.briandunning.com/cf/858

BTW, there is more to it then the Scripts ID. Worth looking at for other needs too.

 

8 minutes ago, Lee Smith said:

BTW, there is more to it then the Scripts ID. Worth looking at for other needs too.

Yes, and that is why we use custom functions for the functionality ... the single CF can be used for different needs and it is quite helpful.  There are links within the custom function itself, and I had also added the link within the CF itself (at the bottom) to Brian Dunning's site.  Matt Petrowsky, Jeremy Bante, Dan Smith and others all have variations available from which to choose.  :-)

Name dropper. LOL:yay:

 

p.s. I only looked at the name of the Function and went to it.

Edited by Lee Smith
add a p.s.

Keep in mind, more than one script can have the same name. That may cause a problem in getting the script ID using Design functions.

Here is an example of why one might need the script IDs: fixing a data-separated solution. We have a dev server and a live server, and every two weeks or so we move the dev UI file to the live server. We do have to watch out for field IDs in the live vs. dev data files, we're very careful about adding new fields, but almost all scripts reside in the UI file so we tend to not think about that much.

However, last month I noticed an issue with a 3rd file, our log file. When me moved our UI file from dev to live, a script in the UI file ended up pointing to an incorrect script in the log file. That is one place where FileMaker is linking things by internal ID.

I used the built-in ScriptIDs ( "" ) and ScriptNames ( "" ) functions on the dev log and live log files. When I put the results together, the results looked like:

1 A
2 B
3 C

in Dev, vs. in Live:

1 A
3 B
4 C

So while on the surface the script names all looked the same, the result was that the file on the Dev server pointed to script (3) which was C on the Dev server, then when moved to the live server pointed to script B!

To resolve this, I did something like duplicate script C twice on the dev server, and once on live. So the script ID was now 5 on both. Back in sync!

Hi Tom,

Thanks for posting this, I can see how this would be useful.

Lee

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.