1 Reply Latest reply on Apr 1, 2013 12:24 PM by philmodjunk

    How can I make a "zero" value in a dropdown list

    hanstrager

      Title

      How can I make a "zero" value in a dropdown list

      Post

           I have made a small application so I can keep track on reciepts. In on layout, I can "filter" (search functions) these reciepts with the following code:

           Go to Layout [ “List” (Zips) ]
           Set Variable [ $CategoryList; Value:Globals::Category ]
           Set Variable [ $K; Value:1 ]
           Enter Find Mode [  ]
           Set Field [ Zips::DATE; Globals::Date1 & "..." & Globals::Date2 ]
           Set Field [ Zips::Season; Globals::season ]
           Set Field [ Zips::Seller; Globals::Seller ]
           Set Field [ Zips::PAYER; Globals::Payer ]
           Set Field [ Zips::Category; GetValue($CategoryList ; 1) ]
           Set Error Capture [ On ]
           Perform Find [  ]
           Loop
           Set Variable [ $K; Value:$K + 1 ]
           Exit Loop If [ $K > ValueCount($CategoryList) ]
           Enter Find Mode [  ]
           Set Field [ Zips::DATE; Globals::Date1 & "..." & Globals::Date2 ]
           Set Field [ Zips::Season; Globals::season ]
           Set Field [ Zips::Seller; Globals::Seller ]
           Set Field [ Zips::PAYER; Globals::Payer ]
           Set Field [ Zips::Category; GetValue($CategoryList ; $K) ]
           Extend Found Set [  ]
           End Loop
            

           I have 2 date fields where i can type a date into, a check box and 3 drop down lists thats taking their value from different fields. My problem is when I want to "uncheck" or have a zero value in the drop down lists - so it dosen't filter/search based on that field, im wonder if there's a way to put in a value at the top which will make this the drop down menu field empty..?

        • 1. Re: How can I make a "zero" value in a dropdown list
          philmodjunk

               Leaving the field empty should work for all but the date fields. The set field step that assigns a date range can be enclosed inside a case or if function that avoids entering an invalid search criterion such as "...", "5/23/2013..." or "...5/23/2013" and you can also add code that stops and displays an error if an invalid date range is entered.

               While the focus is in the field with the pop up menu or radio button format, press the delete key to clear the field. Ir it's a drop down list, there should be any problems clearing the field as you can edit it just like an edit box formatted field.