Jfnall

Q: Another popup menu question

Is it possible to add to a popup menu by linking the cell with the popup menu to a column.  as rows are added to the column, can they be automatically put in the menu of the popup cell?

 

If not, is it possible to get a long list from a colum into a popup menu without manually typing each entry or item in that popup menu?

 

What I'm trying to do is for Form entry.  When a new customer is added, I can go to the table with the customer list and add another row with the new name, and then (hopefully) have that name automatically added to the popup menu list on the form table and form entry sheet.

 

thanks

jeff

MacBook Pro (Retina, 15-inch, Early 2013), iOS 8, iPad Air-all updated software

Posted on Mar 27, 2015 4:29 AM

Close

Q: Another popup menu question

  • All replies
  • Helpful answers

  • by Yellowbox,

    Yellowbox Yellowbox Mar 27, 2015 6:42 AM in response to Jfnall
    Level 6 (10,430 points)
    Mac OS X
    Mar 27, 2015 6:42 AM in response to Jfnall

    Hi Jeff,

    is it possible to get a long list from a colum into a popup menu without manually typing each entry or item in that popup menu?

    Pop-Up Menus are powerful and versatile in Numbers 3. Here we go. A long-winded explanation, but it works.

    Screen Shot 2015-03-27 at 11.54.18 pm.png

    This table has Conditional Highlighting as a safeguard. Select all the Body Cells (A2 to the bottom) and Format Panel > Cell > Conditional Highlighting > Add a Rule > Blank > Cell is Blank > Red Fill.

     

    Select all the white cells and Format Panel > Cell > Data Format > Pop-Up Menu (Start with Blank is important).

    Screen Shot 2015-03-28 at 12.02.44 am.png

     

    The red cells are not included in the Pop-Up Menu and remain as Automatic format.

    Click on Cell A2 and Copy.

    In another table (Form Entry) double click on the column label A to select all Body Cells and Paste

    Screen Shot 2015-03-28 at 12.14.32 am.png

    In each row, choose a customer name from the Pop-Up Menu to reflect your orders.

    Set unused rows to None.

    Screen Shot 2015-03-28 at 12.18.03 am.png

    When you need to add another customer, type the name in the first red cell of Create Pop-Up Menu table.

    That cell turns white (it is no longer Blank).

    Again, select all the white cells and set to Pop-Up Menu.

    Screen Shot 2015-03-28 at 12.19.51 am.png

    Click in A2 of Create Pop-Up Menu table and Copy.

    Click in A2  of the Form Entry table (do not select the whole column) and Paste.

    Select all Body Cells of Column A and Format Panel > Cell > Data Format > Merge Menu Items

    Each cell in A of the Form Entry now has a Pop-Up Menu containing Customers 1 to 5.

    Screen Shot 2015-03-28 at 12.30.17 am.png

    But here is the power of Pop-Up Menus in Numbers 3: The original Customer names have not been overwritten (Customers 1, 3, 4, 1)

    Now you can choose Customer 5 in the first red cell.

    Screen Shot 2015-03-28 at 12.39.04 am.png

    Long-winded? Yes, and it took more time to write this reply than to it took to add a customer to the Pop-Up Menu.

     

    Regards,

    Ian.

  • by t quinn,

    t quinn t quinn Mar 27, 2015 8:04 AM in response to Jfnall
    Level 5 (4,930 points)
    Mac OS X
    Mar 27, 2015 8:04 AM in response to Jfnall

    Hi jfnall,

     

    I am in a similar situation so I wrote a script that addresses it. Here is my set up:

    Screen Shot 2015-03-27 at 8.59.01 AM.png

    I have my popups in column A of sales. I have just added Byron to my contacts and want to update the popups in sales starting with row 3. Note the footer row in contacts. Since the script copies the last cell in the row I want it to stay empty.

     

    The script:

     

    -- This script converts column A in one table into an alphabetized list of popups. It copies the last cell in that column, then reverts the column to text. It then refreshes popups in column A of a data table starting with a user defined row.

     

     

    property DataEntrySheet : "Sheet 1" --name of sheet with popups to be refreshed

    property DataEntryTable : "Sales" --name of table with popups to be refreshed

    set copyRange to {}

     

    property PopValueSheet : "Sheet 1" --name of sheet with popup values table

    property PopValueTable : "Contacts" --name of table with popup values

    set PopStartRow to {}

     

    tell application "Numbers"

      set d to front document

      set ps to d's sheet PopValueSheet

      set pt to ps's table PopValueTable

     

      set s to d's sheet DataEntrySheet

      set t to s's table DataEntryTable

      set tf to t's filtered --this records filter setting on data Entry Table

      display dialog "Start from row #..." default answer "" with icon 1 -- with icon file "Path:to:my.icon.icns" --a Week # row

      set PopStartRow to {text returned of result}

     

      tell pt --convert list to alphabetized popups

      set ptRows to count rows

      set copyRange to ("A2:" & name of cell ptRows of column "A")

      set selection range to range copyRange

      set selection range's format to text

      sort by column 1 direction ascending

      set selection range's format to pop up menu

      -- popupsmade

      set selection range to cell ptRows of column 1 of pt

      set v to value of cell ptRows of pt

      end tell

      activate application "Numbers"

      tell application "System Events" to keystroke "c" using command down

      tell pt

      set selection range to range copyRange

      set selection range's format to text

      end tell

      tell t

      set filtered to false

      set tRows to count rows

      set pasteRange to ((name of cell PopStartRow of column "A") & ":" & (name of cell tRows of column "A"))

      set selection range to range pasteRange

      tell application "System Events" to keystroke "v" using command down

      set filtered to tf

      end tell

    end tell


    Open your Applescript Editor (I think it is Script Editor in Yosemite) and paste this script in. I set my Script Editor to show up in the menu bar and run scripts right from there.

     

    You need to make sure that the 4 properties at the beginning of the script agree with your setup. Your customer table may be my contacts table  and it may not be on the same sheet. When you run the script it will ask you where you want to start with the refreashed popups. It will overwrite any cells starting with the row you designate.

     

    This is a generic version of the script I made for myself. Let me know how it works for you.

     

    quinn

  • by SGIII,

    SGIII SGIII Mar 27, 2015 8:56 AM in response to Jfnall
    Level 6 (10,622 points)
    Mac OS X
    Mar 27, 2015 8:56 AM in response to Jfnall

    I've noticed that if you put Copy Style and Paste Style the toolbar:

     

    Screen Shot 2015-03-27 at 11.49.11 AM.png

     

    Then you can:

    1. Add the new value(s) to your source column
    2. Select the values in the column and choose Data Format > Pop-Up Menu
    3. Select one of the cells in the source column (which now includes the new values in its Pop-up Menu) and click Copy Style
    4. Select cells in the target column, and click Paste Style.  The target column will then include the (expanded) Pop-up Menu.

     

    SG

  • by Jfnall,

    Jfnall Jfnall Mar 28, 2015 9:09 AM in response to Yellowbox
    Level 1 (1 points)
    Mar 28, 2015 9:09 AM in response to Yellowbox

    not much different than I am doing it now. with deleting cells and copying and pasting in new popup menu cells in its place, with the added customer name.  just so of a convoluted way to simply add a name to a dropdown list. 

    thanks

  • by SGIII,

    SGIII SGIII Mar 28, 2015 9:25 AM in response to Jfnall
    Level 6 (10,622 points)
    Mac OS X
    Mar 28, 2015 9:25 AM in response to Jfnall

    deleting cells and copying and pasting in new popup menu cells in its place, with the added customer name.

     

    Curious why you think  "deleting cells and copying and pasting" is anything like what is suggested in any of the messages upthread! 

     

    Have you tried any of the suggested methods?

     

    SG

  • by Jfnall,

    Jfnall Jfnall Mar 28, 2015 9:59 AM in response to t quinn
    Level 1 (1 points)
    Mar 28, 2015 9:59 AM in response to t quinn

    DDo scripts perform or run on the iPad or is that a desktop version only fix

  • by t quinn,

    t quinn t quinn Mar 28, 2015 11:48 AM in response to Jfnall
    Level 5 (4,930 points)
    Mac OS X
    Mar 28, 2015 11:48 AM in response to Jfnall

    Hi Jeff,

     

    Currently, scripts are only running on the desktop. Don't know if that will change antime soon.

     

    quinn

  • by Jfnall,

    Jfnall Jfnall Mar 29, 2015 5:47 PM in response to SGIII
    Level 1 (1 points)
    Mar 29, 2015 5:47 PM in response to SGIII

    there is copying and pasting on the 1st and 3rd descriptions. 

     

    what i was wondering was if the newest version of Numbers allowed for a source column that could be added to, and those rows typed into the source column would automatically become available in a linked Popup target cell.  would be nice to add a customer, or several, then sort the column, and the popup menu be adjusted with the new names, in alphabetical order, without having to manually move stuff around inside the popup menu editing window.

  • by t quinn,

    t quinn t quinn Mar 29, 2015 10:26 PM in response to Jfnall
    Level 5 (4,930 points)
    Mac OS X
    Mar 29, 2015 10:26 PM in response to Jfnall

    Hi Jeff,

     

    The answer is "No, you can't do that in Numbers."

    You can always give Apple feedback. This is a popular request on this forum.

     

    quinn

  • by Leslie Bartiromo1,

    Leslie Bartiromo1 Leslie Bartiromo1 Jan 16, 2016 8:32 AM in response to SGIII
    Level 1 (25 points)
    Jan 16, 2016 8:32 AM in response to SGIII

    THANK YOU!  This helped me with a problem I've had with a checkbook spreadsheet I've been slaving over!  Now I can copy popup items from month to month/tab to tab.

  • by Tconstruct,

    Tconstruct Tconstruct Sep 2, 2016 3:43 PM in response to SGIII
    Level 1 (9 points)
    Sep 2, 2016 3:43 PM in response to SGIII

    Easiest solution, by far!