2 Replies Latest reply on Jan 27, 2016 1:04 AM by Stigge

    Help - Use a drop-down list values in a Script?

    Stigge

      Hi

       

      To make my script a little bit more effective i need to use the values of a drop-down list in a loop. Is that even possible ?

       

      The list i have is a list of Teranga codes (different departments within our company).I am working on the Pre-invoicing for IT services.

      So when am running my "report" it does the full script on each Teranga. today i written the script for that line by line manually.

      Thats not good, since it might be some Terangas added or removed then i need to change in to many places.

       

      Part of the script:

       

      If [ PreInvoicing::Total = "" ]

      New Record/Request

      End If

      Set Field[ PreInvoicing::Teranga; "3875" ]

      Set Field[ PreInvoicing::Period; $$MainPeriod ]

      Perform Script[ “Calculate” ]

      New Record/Request

      Set Field[ PreInvoicing::Teranga; "3880" ]

      Set Field[ PreInvoicing::Period; $$MainPeriod ]

      Perform Script[ “Calculate” ]

      New Record/Request

      Set Field[ PreInvoicing::Teranga; "4126" ]

      Set Field[ PreInvoicing::Period; $$MainPeriod ]

      Perform Script[ “Calculate” ]

      New Record/Request

      Set Field[ PreInvoicing::Teranga; "4129" ]

      Set Field[ PreInvoicing::Period; $$MainPeriod ]

      Perform Script[ “Calculate” ]

      New Record/Request

      Set Field[ PreInvoicing::Teranga; "4164" ]

      Set Field[ PreInvoicing::Period; $$MainPeriod ]

      Perform Script[ “Calculate” ]

      The lines continues with all the 17 terangas.

      It would be nicer to have it looped with the drop-down list values.