Method Community

 

How do I add a Time Zone filter to a tables and grids lookup?

Last post 10-07-2016 11:37 AM by Ben. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-23-2014 4:55 PM

    • Ben
    • Top 500 Contributor
    • Joined on 06-17-2014
    • Posts 10

    How do I add a Time Zone filter to a tables and grids lookup?

    I would like to add a time zone filter to my Vendor and Customer lookup tables/grids.  I would like to know how to add this filter to the window that I see on the left hand side of the screen when I open my vendors window.  I would like the option to either not use the filter, or to select one of the United States time zones as a filter.


  • 07-24-2014 9:49 AM In reply to

    Re: How do I add a Time Zone filter to a tables and grids lookup?

    Hi Ben.  It sounds like you might already have a time zone field in your entity table.  If not you will need to add a drop down field to this table (This will still work if you've already added 2 fields to the vendor and customer tables but it's easier just to add one to the entity table).

    Once you have the field created you should just have to customize your screens.  If you edit the grid the wizard should allow you to add a new filter in step 3.  Here you can name the filter and specify the time zone values that should show up.  You'll need to do this for each screen you want this filter for (Eg customer and vendor).

  • 07-24-2014 11:05 AM In reply to

    • Ben
    • Top 500 Contributor
    • Joined on 06-17-2014
    • Posts 10

    Re: How do I add a Time Zone filter to a tables and grids lookup?

    Hi Mark,

    I've recently become more familiar with the Vendor edit page, but I'm unfamiliar with the entity table.  Are you thinking that time zone is an existing field or drop down that comes standard for everyone, or are you thinking that I am going to need to define all of the states that exist within each time zone option?  If so, I'm not even sure where to begin on that task because I don't really even know how to get to the entity table.

    Could you expound a little for me?  Thanks for being patient and helpful with my super beginner questions!

  • 07-24-2014 2:32 PM In reply to

    Re: How do I add a Time Zone filter to a tables and grids lookup?

    Answer

    Hi Ben.  No problem.  If you go to the Customize tab, then the Tables / Fields tab link you'll see a table called Entity.  From here you need to add a new field for time zone.  Name the field and select Dropdown as the Field Type.  Click Add Field.  Chose the Create a new table.

    This new table will store the list of time zones you use.  For step 2 you can select Basic Options.  Then enter your time zones in step 3.

    At this point you now have a field which can store time zones for any entity (customers, vendors, contacts, employees, etc).  It won't appear on any of your screens until you add it though.

    To do this go to the Customize tab, then the Screens tab. Then edit the Screens for Customer and Vendor.  If you aren't already using custom screens you'll need to create copies of the default ones.  The default ones are CRM_EditCustomer, CRM_EditLead, CRM_EditVendor.  From here you can find the Time zone field you created on the left under fields and add it to your screen.

    Once you get this far my previous steps on how to modify your grid to filter by time zone will make more sense.

  • 10-07-2016 11:37 AM In reply to

    • Ben
    • Top 500 Contributor
    • Joined on 06-17-2014
    • Posts 10

    Re: How do I add a Time Zone filter to a tables and grids lookup? (...and add logic to the state field)

    I would now like to cause the time zone field to auto-update based on the input in the state field


    - for example an input into the State field of OK (for Oklahoma) would result in CDT (for Central Daylight Time) in the TimeZone Dropdown Field.

    In excel this is done easily.  Here is the scripting: =if(ISNUMBER(SEARCH(A1,"WA,OR,CA,NV")),"PDT",if(ISNUMBER(SEARCH(A1,"MT,ID,WY,UT,CO,AZ,NM")),"MDT",if(ISNUMBER(SEARCH(A1,"ND,SD,NE,KS,OK,TX,MN,IA,MO,AR,LA,WI,IL,TN,MS,AL")),"CDT",if(ISNUMBER(SEARCH(A1,"MI,IN,OH,PA,NY,VT,ME,NH,MA,RI,CT,KY,NJ,DE,MD,WV,VA,NC,SC,GA,FL,DC")),"EDT",if(ISNUMBER(SEARCH(A1,"AK")),"AKDT",if(ISNUMBER(SEARCH(A1,"HI")),"HST",""))))))


    "A1" Being the reference cell in this case.  In Method, I would like to have the State Field be the reference field, and set up an action for that field based on text change (unless you know of a better way to do this)

Page 1 of 1 (5 items)