Our Preferred 5 Star Hosting Provider - Award Winning FileMaker Pro Hosting
Results 1 to 4 of 4
  1. #1
    Forum Member
    Join Date
    Jan 2017
    Posts
    20
    Location
    Kathmandu, Nepal
    FileMaker Pro Software
    FileMaker 14 Advanced
    OS
    Mac
    Skill Level
    Novice
    Last Post
    04-28-2017
    Local Date
    09-20-2017
    Local Time
    09:26 PM
    Last Active
    09-01-2017

    How to add one extra item in Value Lists

    I have created a value list based on Products table.

    However, while selecting products, sometime I need to select all products. While showing product name in popup menu, I want to show one more value called "All" for denoting that it applies to all products.

    How can I do that?

  2. #2
    FileMaker Mentor
    Join Date
    Aug 2015
    Posts
    99
    Location
    Broomall, PA USA
    FileMaker Pro Software
    FM 16 Advanced
    OS
    Windows
    Skill Level
    Intermediate
    Last Post
    09-19-2017
    Local Date
    09-20-2017
    Local Time
    11:26 PM
    Last Active
    09-20-2017
    Seems like a bit of a structural problem. You want to put all of the values from products into one text field?
    Can you describe what's going on with your workflow, and how you use this field in your database?

  3. #3
    Senior Moderator - FMT Preferred Developer Consultant - New York - Worldwide AHunter3's Avatar
    Join Date
    Aug 2006
    Posts
    12,153
    Location
    New York and Nassau County, NY, USA
    FileMaker Pro Software
    FileMaker Advanced/Developer 14, 13, 12, 11, 10, 9. 8.8, 8, 7, 6, 5.5 FileMaker Pro 8, 7, 6, 5.5, 5
    OS
    Windows & Mac
    Skill Level
    Developer
    Last Post
    09-20-2017
    Local Date
    09-20-2017
    Local Time
    11:26 PM
    Last Active
    09-20-2017
    Here's one way of doing it:

    Step A: I assume you already have a value list of products, the value list that does not contain "All" as a final option. Yes? If not, create such a value list. I will refer to this value list as "OriginalProductsVL".

    Step B: Create a selfjoin relationship based on RecID = RecID of the table you are in; that is a special selfjoin relationship that actually joins this individual record to itself and no other. Let's call the new table occurence of our table "VLTableOcc"

    Step C: Create a text field, let's call it "AdHocValueList", in this same table

    Step D: Create a new value list, let's call it "ProductsAndAll", defined as related values only of VLTableOcc::AdHocValueList

    Step E: Create a script, let's call it "LoadVL", with these script steps:

    If [YourTable::AdHocValueList = ValueListItems (Get (FileName); "OriginalProductsVL" & "" & "All" or Get (WindowMode)≠ 0]
    .. Exit Script
    End If
    Set Field [YourTable::AdHocValueList; ValueListItems (Get (FileName); "OriginalProductsVL" & "" & "All" ]
    Go to Field [YourTable::Product_Dropdown_Field; select/play]

    Step F: Format the field YourTable::Product_Dropdown_Field to use the value list "ProductsAndAll" instead of "OriginalProductsVL".

    Step G: Attach the script LoadVL to the field itself either as a buttonscript or as triggered by OnObjectEnter

  4. #4
    Forum Member
    Join Date
    Dec 2014
    Posts
    7
    Location
    Canada
    FileMaker Pro Software
    14 Advanced
    OS
    Windows
    Skill Level
    Pro
    Last Post
    05-02-2017
    Local Date
    09-20-2017
    Local Time
    08:26 PM
    Last Active
    09-18-2017
    You can add one record to the product table and input "All" as product name for that record. This way the word "All" would show up in the value list which is based on the Product names from Products table.

    Then set a trigger script to run on object save for the field with drop down on your layout. This script would check the value of the field, If the field value is "All" then set the target field to list of all product names. You can achieve it through a relationship or using "ExecuteSQL".

    Please let me know if you need more clarifications.
    Siroos Jafary



    Intelligence Avenue inc.

    Website: www.iavenue.ca

    Email: info@iavenue.ca

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 01-06-2011, 01:49 AM
  2. How to get rid of extra lines in webviewer?
    By beju0506 in forum FileMaker Pro 9
    Replies: 1
    Last Post: 12-05-2008, 11:31 AM
  3. a couple extra bucks
    By dverplank in forum FileMaker Pro 9
    Replies: 0
    Last Post: 11-09-2008, 04:54 PM
  4. Extra record at the end of portals
    By John Heffernan in forum Layouts and Design
    Replies: 3
    Last Post: 08-11-2002, 05:51 PM
  5. master item to item history- multi-record per item
    By guy in forum Portal & Relationships
    Replies: 5
    Last Post: 01-14-2002, 03:06 AM

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.