Brian Dunning's FileMaker Custom Functions

AssignWindowName ( Text )

Add " - num" to Text when the Text is not unique in WindowNames.

  Average rating: 4.8 (30 votes) Log in to vote

Koji Takeuchi   Koji Takeuchi - Show more from this author
TonicNote, Inc.
https://tonicnote.com

Share on Facebook Share on Twitter

  Sample input:
AssignWindowName ( "Customer" )
  Sample output:
"Customer - 2"

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

AssignWindowName ( Text )
2011.05.18, Koji Takeuchi


description:
Add " - num" to Text when the Text is not unique in WindowNames.
Assumed this will use in script for changing layout and specifying window name.
ex.
Text = text you're about to assign window name to current window.
ex. "Customer"

AssignWindowName ( "Customer" )
-> "Customer - 2" (When window exists which name has "Customer")
-> "Customer - 3" (When window exists which name has "Customer" and "Customer - 2")
-> "Customer - 3" (When window exists which name has "Customer - 2" and does not exists window "Customer")
-> "Customer - 2" (When window exists which name has "Customer" and "Customer - 2" and current window name is "Customer - 2")

 

Comments

Dr_John   Dr_John, none
Nov 16, 2019
You are a hard man to find. Your website has a problem.
 
Koji Takeuchi   Koji Takeuchi, TonicNote, Inc.
Nov 16, 2019
Hi, Dr_John.
Are you saying about me, or Brian Dunning?
 
Camberol   Camberol
Oct 28, 2020
This no longer seems to work in FM 19.1.2 Mac
Shouldn't AssignWindowName ( Get ( WindowName ) ) be "WindowName - 1"
The result on FM19 is WindowName.
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: