Our Preferred 5 Star Hosting Provider - Award Winning FileMaker Pro Hosting
Results 1 to 4 of 4
  1. #1
    Forum Member
    Join Date
    Mar 2012
    Posts
    14
    Location
    Memphis, TN USA
    FileMaker Pro Software
    FMPA 16 FMS 16
    OS
    Mac
    Skill Level
    Intermediate
    Last Post
    06-03-2017
    Local Date
    10-20-2017
    Local Time
    05:32 AM
    Last Active
    08-01-2017

    Testing for existence of a card

    I have a module that can be called by two different scripts. In one instance, a card window will be open, and the module needs to close the card window. But in the other instance, the card will not exist, and a close window command would close the solution. I tried specifying the window name, but the script doesn't see it. For that matter, neither do I, since cards have no visible window names. Help?

  2. #2
    Good guy doughemi's Avatar
    Join Date
    Apr 2005
    Posts
    1,274
    Location
    Middleport, NY USA
    FileMaker Pro Software
    FMPA 14
    OS
    Windows & Mac
    Skill Level
    Intermediate
    Last Post
    10-16-2017
    Local Date
    10-20-2017
    Local Time
    06:32 AM
    Last Active
    10-20-2017
    Can you sneak up on it from behind by using
    Code:
    If(Get(WindowName)≠"YourMainWindowName")
    ?

    EDIT: I don't have FMP16, but Get(WindowStyle) should return a unique number for a card window (3?). Check your help file.
    Last edited by doughemi; 06-02-2017 at 09:58 PM.
    Give the gift of life. Register as an organ donor today!
    http://www.organdonor.gov/becomingdonor

  3. #3
    Senior Moderator - FMT Preferred Trainer - Consultant: Australia, New Zealand, Japan & Pacific Rim David Head's Avatar
    Join Date
    Apr 2001
    Posts
    2,892
    Location
    Sydney, NSW Australia
    FileMaker Pro Software
    FileMaker Pro 15 Advanced
    OS
    Windows & Mac
    Skill Level
    Developer
    Last Post
    10-17-2017
    Local Date
    10-20-2017
    Local Time
    09:32 PM
    Last Active
    10-19-2017
    doughemi is correct that Get(WindowStyle) returns 3 for a card window, so you could test for the current window style to determine what to do.

    One would also assume that you would normally name the new card window in the script step so you should know that name and be able to test for it using Get(WindowName). If you do not specify a name for the new window, it will have the parent window name with " - 2" appended e.g. if the window was "My Solution", the new window would be called "My Solution - 2".
    Regards,
    David Head
    FileMaker 15 Certified Developer
    FBA Trainer
    LinkedIn Profile

    There is always a well-known solution to every human problem - neat, plausible, and wrong.
    H. L. Mencken, Prejudices: Second Series, 1920

  4. #4
    Forum Member
    Join Date
    Mar 2012
    Posts
    14
    Location
    Memphis, TN USA
    FileMaker Pro Software
    FMPA 16 FMS 16
    OS
    Mac
    Skill Level
    Intermediate
    Last Post
    06-03-2017
    Local Date
    10-20-2017
    Local Time
    05:32 AM
    Last Active
    08-01-2017
    That got it. Thanks to both of you for your help.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Testing 1 2 3 4
    By Ross MacLane in forum Forum Problems and Questions
    Replies: 1
    Last Post: 03-31-2010, 08:28 PM
  2. Calc to show text based on existence in other fields
    By dmontano in forum Calculations and Define Fields
    Replies: 7
    Last Post: 07-25-2008, 06:31 PM
  3. Test for existence of related records
    By David Head in forum Calculations and Define Fields
    Replies: 4
    Last Post: 08-09-2007, 01:16 PM
  4. Replies: 11
    Last Post: 06-13-2007, 01:49 PM
  5. testing
    By imported_Ross in forum FileMaker Pro Versions 5 & 6
    Replies: 0
    Last Post: 09-06-2002, 12:30 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Welcome to the Original FileMaker Forum
With designated forums for almost every FileMaker topic...FileMaker Today is a FREE to join community where you can boost your FileMaker expertise, build better apps & solutions and interact with over 42,000+ FileMaker Developers from all over the world. If you're building FileMaker solutions, this is the place for you.
Follow FMT
We Are FMT
FMT is home of The World's leading FileMaker News Site, Worldwide Developer Directory, FileMaker Connect Community and so much more.