How to create a pulldown list in numbers

how to create a pulldown list in numbers

Here is it:
Open Applescript editor
Copy the entire script and paste it into Applescript Editor
Compile it
Read the instructions at the top of the script
Run the script, following the instructions.
You can save the script and it will be available in the Scripts menu (on the right side of the menu bar where Time Machine , Airport, and all those icons are).
Copy and paste all of what is below:
-- Script to populate a Numbers pop-up list.
-- Instructions:
--                    GUI scripting must be on in System Preferences
--                    Create a list of items. Must be a contiguous range of cells in a table.
--                    Select the range of cells to use as items in the popup.
--                    Run the script. 
--                    A dialog box will appear asking you to select which cells you want to turn into pop-ups
--                    Select the cells then click OK on the dialog box
set tValues to my doThis(1) -- get values of the selection
if tValues is not "" then
  activate
          display dialog "Select the cells where you want to create the PopUp." & return & "After that, click on the 'OK' button."
          my doThis(tValues) -- set the cell format of the new selection to "PopUp Menu" and set the values of the each menu item
          tell application "Numbers" to display dialog "Done"
else
          tell application "Numbers" to display dialog "You must select the cells in a table before running this script."
end if
on doThis(n)
          tell application "Numbers"
                    set tTables to (tables of sheets of front document whose its selection range is not missing value)
                    repeat with t in tTables -- t is a list of tables of a sheet
                              if contents of t is not {} then -- this list is not empty, it's the selected sheet
                                        set activeTable to (get item 1 of t)
                                        if n = 1 then return value of cells of selection range of activeTable -- return values of the selection
                                        set format of (cells of selection range of activeTable) to pop up menu -- set the format to pop up menu
                                        return my setValuePopUp(n) -- set value of each menu item
                              end if
                    end repeat
          end tell
          return ""
end doThis
on setValuePopUp(L)
          tell application "System Events"
                    tell process "Numbers"
                              set frontmost to true
                              delay 0.3
                              set inspectorWindow to missing value
                              set tWindows to windows whose subrole is "AXFloatingWindow"
                              repeat with i in tWindows
                                        if exists radio group 1 of i then
                                                  set inspectorWindow to i
                                                  exit repeat
                                        end if
                              end repeat
                              if inspectorWindow is missing value then
  keystroke "i" using {option down, command down} -- Show Inspector
                              else
  perform action "AXRaise" of inspectorWindow -- raise the Inspector window to the front
                              end if
                              delay 0.3
                              tell window 1
  click radio button 4 of radio group 1 -- the "cell format" tab
                                        delay 0.3
                                        tell group 2 of group 1
                                                  set tTable to table 1 of scroll area 1
                                                  set tc to count rows of tTable
                                                  set lenL to (count L)
                                                  if tc < lenL then -- ** add menu items **
                                                            repeat until (count rows of tTable) = lenL
  click button 1 -- button [+]
                                                            end repeat
  keystroke return -- validate the default name of the last menu item
                                                  else if tc > lenL then -- ** remove menu items **
                                                            repeat while exists row (lenL + 1) of tTable
                                                                      select row (lenL + 1) of tTable
  click button 2 --  button [-]
                                                            end repeat
                                                  end if
                                                  tell tTable to repeat with i from 1 to lenL -- ** change value of each menu item **
                                                            set value of text field 1 of row i to item i of L
                                                  end repeat
                                        end tell
                              end tell
                    end tell
          end tell
end setValuePopUp

Similar Messages

  • How to create a Custom List without the column "Title" ?

    Maybe this one is easy as it sounds, I just want to know how to create a little list for my SharePoint application featuring 3 columns:
    1 - User Name (this should be Person type - UNIQUE + Required)  
    2 - Report (Memo - Required)
    3 - Status (Choice + Required)
    The list will be used to allow the users to submit a weekly report and I don't want to include the title because there is no use to me, I know I can hide the column by customizing the list but this sounds very amateur even for a newbie like me (yeah... sounds
    so cheap!), since I've been reading a lot about custom content types and I still didn't get the chance to use this properly I was wondering how I could put them to use and I guess the example here would be the best right?  
    I really spent some time trying but I always end getting the Title even when I try to use custom content types so I'm really giving up and asking for some help at this point.
    Thanks a lot for the help!!!

    Yes, you can do that. If you need a different content type with your custom fields. Following are the steps : http://www.dotnetcurry.com/ShowArticle.aspx?ID=620 
    After creating your custom Content Type, Click on the 'Title' filed in your custom content type. 
    In the 'Column Settings' make it 'Hidden (Will not appear in forms)' and click ok.
    Now add this content type to your list/library. 
    In the list/Library go to setting and 'Advance settings' and make the 'Allow management of Content Type?' as 'yes' and click ok.
    Now make default content type not visible from 'Change new button order and default content type' link in the settings page of list/library, and your contet type as 'Default'.
    Create a new view, remove the 'Title' field and make that view as 'dafault' view, you can delete the 'All Items' view also if required.
    Now whenever user come to that list/Library they will not see the title column and also will not appear in the 'New Item'.
    Note : The 'Title' field is mandatory in all the list/library and by default added to the 'All Item' view. So, by doing above steps you are creating a new content type where 'Title' is not mandatory and also not added in default view.
    get2pallav
    Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

  • How do I add a list of numbers stored in an array

    How do I add a list of numbers stored in an array? The code I
    have is showing ‘NaN’ when I try to add the second item
    in each element of the array:
    var aItemPrices:Array = new Array(["item1_mc", 10], ["item
    2_mc", 20], ["item 3_mc", 30]);
    var totalPrice:Number;
    for (i=0; i<aItemPrices.length; i++) {
    //the following line traces 'NaN'
    totalPrice += aItemPrices
    [1];
    trace("totalPrice: "+ totalPrice);

    i modified your code in 2 places, check it
    var aItemPrices:Array = new Array(["item1_mc", 10], ["item
    2_mc", 20], ["item 3_mc", 30]);
    var totalPrice:Number=0; //Mani changes
    for (i=0; i<aItemPrices.length; i++) {
    //the following line traces 'NaN'
    totalPrice += aItemPrices
    [1];//Mani changes
    trace("totalPrice: "+ totalPrice);

  • How to Create Interactive report lists for the gross sales, credit ....

    How to Create Interactive report lists for the gross sales, credit returns, and gross weight for the               customer for the current year and comparing the same with that of the previous year for the same period.....
    plz tell me steps to accomplish this....plz ...give me the detail description..plz......many many thnx in advance...

    Hi raja,
    Display a checkbox , customer number on the basic list and also set a GUI STATUS  on the basic list.....
    Select the customer by checking the checkbox and click on the button you create in the GUI status....
    Write the desired code to be displayed in
    AT USER-COMMAND even checking the sy-ucomm....
    so this would make you to into interactive list...
    Hope this would help you.
    Regards
    Narin Nandivada

  • How to create new character styles in Numbers 3.0

    In Numbers 3.0, it is possible to update existing characters styles, but I cannot find how to create a new character style, the + sign in the popup is always inactive when I edit text in a cell. The paragraph style popup has an active +, but it doesn't work for character style.
    Is there any way to create a new character style?

    Guillame,
    You're right about not being able to add styles, and I have not figured out how to modify a predefined character style, other than to Rename or Delete a predefined style. I have added this to my list of things lost.
    Jerry

  • How to create a dropdown list to list the values from two different tables?

    Hi,
    I have the following requirement:
    1. I have to create a dropdown list to display all the values from the second column of  a table.
    2. Another dropdown list to display all the values from the second column of another table.
    3. A text box should help me to add the selected values.
    How to get this done in a PDF? Please help.
    Regards,
    Latha

    Is this a LC form? Because Acrobat forms have no concept of tables, just
    individual fields...

  • How to create a Printer List in Forms 4.5

    How can I create a Printer list on Forms 4.5 to show all
    available printers?
    Thanks.
    null

    I fear there is no direct solution.
    May be this is a work-around:
    1. Apply the older built-in: Display_item. You can't disable the item with display_item, but you can change the visual attribute and show the user that this item should not be checked.
    2. To be shure that the user doesn't ignore this "disable", you need a trigger, which resets the item to the proper value after an illegal change.

  • How to create a Access list on core switch to bloxk all Internet Traffic & allow some specific Internet Traffic

    Hellp Everyone,
    I am trying to create a Access-List on my Core Switch, in which I want to allow few internet website & block the rest of them.
    I want to allow the whole Intranet but few intranet websites also needs access to the internet.
    Can we create such Access-List with the above requirement.
    I tried to create the ACL on the switch but it blocks the whole internet access.
    i want to do it for a subnet not for a specific IP.
    Can someone help me in creating such access list.
    Thanks in Advance

    The exact syntax depends on your subnets and how they connect to the Internet. If you can share a simple diagram that would be much more informative.
    In general just remember that access-lists are parsed from the top down and as soon as a match is found, the processing stops. So you put the most specific rules at the top. also, once you add an access-list, there is an implicit "deny any any" at the end.
    The best approach is to create some network object-groups and then refer to them in your access list. From your description, that would be something like three object-groups - one for the Intranet (Intranet), one for the allowed servers that can use Internet (allowed_servers), and a third for the permitted Internet sites (allowed_sites).
    You would then use them as follows:
    ip access-list extended main_acl
    permit any object-group intranet any
    permit object-group allowed_servers object-group allowed_sites any
    interface vlan
    ip access-group main_acl in
    More details on the syntax and examples can be found here:
    http://www.cisco.com/en/US/docs/ios-xml/ios/sec_data_acl/configuration/15-2mt/sec-object-group-acl.html#GUID-BE5C124C-CCE0-423A-B147-96C33FA18C66

  • How to create a sharepoint list to add/change/delete the data in SQL server Table based on users inputs

    I have a table in sql with employee_num and I need to create a list and link that list to this table to make changes to table based on values user enter or selects.

    Hi,
    In addition, you could refer to one similar thread for related information:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/8ee8a7b2-ddfc-4654-b84e-b062aeb527ae/how-to-create-exernal-list-in-sharepoint-which-fetch-data-from-multiple-sql-table?forum=sharepointgeneral
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to create Dynamic Selection List containg file names of a directory?

    Hi,
    I need a Selection List with a Dynamic List of Values containing all file names of a particular directory (can change through the time).
    Basically, I need an Iterator over all file names in a directory, which could be used for Selection List in a JSF form.
    This iterator has nothing to do with a database, but should get the names directly from the file system (java.io.File).
    Can anybody tell me how to create such an iterator/selection list?
    I am working with JDeveloper 10.1.3.2, JSF and Business Services.
    Thank you,
    Igor

    Create a class like this:
    package list;
    import java.io.File;
    public class fileList {
        public fileList() {
        public String[] listFiles(){
        File dir = new File("c:/temp");
        String[] files = dir.list();
        for (int i = 0; i < files.length; i++)  {
                System.out.println(files);
    return files;
    Right click to create a data control from it.
    Then you can drag the return value of the listFiles method to a page and drop as a table for example.
    Also note that the Content Repository data control in 10.1.3.2 has the file system as a possible data source.

  • How to create an email list server solution with java

    hi all
    I would like to create a email list service with java.
    (when I say email list service, I mean , you send email and everyone who subscribes to the list receives the email automatically or the email is held in a queue for approval )
    this solution would have to be integrated with the emailing standards .
    Could someone share with me how one would create a list service with java and how it would work with the email and pick it up ?
    stephen

    or if there is an open source solution please let me know
    stephen

  • How to create place holders for serial numbers in billing document

    Hey Guys,
    I want to create place holders for serial numbers in the billing documents so that the serial number information along with the material number is copied from the delivery document into the billing document. Could you please suggest how to do this.

    Hey friend,
    We have a user exit for that however I don’t remember it. It is known issue as it is essential in India for a telecom industry. They need to declare their invoice no. according to the area. So they are assigning there no ranges with plants. Here plants are nothing but different region.
    So you try to find out that exit as you have the similar requirement. And your problem will be solved. If your ABAPer don’t get the user-exit and it’s really urgent come back I will find it out for you.

  • SharePoint 2013 Online : Custom List view xslt webpart UI vs List View WebPart UI with search ? How to create a xslt list view webpart same UI as list View webpart ???

    I have created a xslt list view webpart but I does not have UI as SharePoint 2013 list view UI.
    how I can have it.
    Ahsan Ranjha

    Hi Ahsan,
    According to your description, my understanding is that the UI is different between XSLT web part and List View web part.
    Per my knowledge, the List View web part is a kind of the XSLT list view web part which uses XSLT to display data on the page.
    http://sharepoint-videos.com/list-view-and-data-view-web-parts/
    How did you add the XSLT web part and the List View web part?
    Could you please provide a screenshot of the two web parts?
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • How to create a content list for sections and chapters etc

    just started with Pages on iPad 2 and really like is BUT where is the control for creating a content list for a long document for chapetrs etc?
    thanks guys

    Hi,
    Thank you for posting the screen shots I have been unsuccessful in determining exactly where the problem is coming from. Would it be possible for you to post the actual VI so that I can work with it so see if I can reproduce this issue using your code? In regard to your questions:
    1.    You are correct 1000 samples read should write 1000 samples to the table
    2.    I believe the discrepancy is due to amount of manipulation done between the read and the file write but I cannot be certain, without the code to work with.
    3.     I am unclear as to exactly what is happening. If you are reading empty channels then you may receive erroneous readings this is to be expected. When you connected your accelerometer did you connect in RSE or differential? You can also manipulate the signal range with will affect the gain setting, how off are the readings?
    JaceD
    Signal Sources Product Support Engineer
    National Instruments

  • How to create dependent Select Lists?

    Hi,
    Found in the documentation that to create dependent select list we have to do these 3 things:
    1. In the parent select list, choose the option "select list with submit".
    2. Defining a branch that branches back to the current page.
    3. In the child select list sql, use the value of the parent (eg. :P6_PARENT_SELECT_VALUE).
    When I change the value of parent select list the page is getting submitted and its going to the parent page. I've a branch that goes to the parent page but how to create a branch that comes back to the same page and then use it in parent select list?
    Thanks,
    Hozy

    Hi Hozy,
    1. Make the branch conditional...
    2. Create a new branch while will run when you make a selection in parent select list.
    Also check this site to create dependent select list without sumbitting the page....
    http://www.dba-oracle.com/t_html_db_apex_ajax_application_express.htm
    Regards,
    Shijesh

Maybe you are looking for

  • Using a serial port via kermit and a USB adapter

    I have need to use a USB->Serial adapter for connecting to console ports (Firewalls, etc). I bought a nice Keyspan adapter for this. First, I've not been able to find a version of kermit that will work on Snow Leopard. Anyone have an updated version?

  • How to delete a message in a que

    Hi, How can I delete an unwanted message, which is already in the queue (JMS) before it get consumed.?

  • Want Flash movie to scale with table cell. NOT WORKING!

    Greetings; I have authored a Flash movie and it is working fine. When I use the html page output by Flash it scales fine but when I cut and paste this code into a table cell the movie will not scale (in Firefox) and not showup at all in IE 7. Help ap

  • Illustrator Drop Shadow Offset

    I want to move a drop shadow to the left rather than the right. In Illustrator CS 5 I would enter a negative value in the offset boxes. In Illustrator CS6 and CC, the app won't let me put in a negative number. Is this an error or is there a new way t

  • Captivate 5 on the Mac

    Happy that Captivate will finally be available for the Mac. However, we are a PC and a Mac shop. I am assuming I will need 2 separate licenses? Also, does anyone know if I design a movie on the Mac, can I edit it and incorporate it into a PC-designed