Forum Discussion

Raghukatta's avatar
Raghukatta
Contributor
8 years ago

How to send a variable in combo box

I am trying to send a variable in a combo box.

Call Aliases.Ascend.frmCustomer.fmePOA.cmbPOAStatus.ClickItem((ProjectSuite.Variables.Translations.Item(ProjectSuite.Variables.Environment,2)))

If select Active in this other fields will be enabled.

Code is working fine (Other fields are getting enabled) when I send the value directly as below

Call Aliases.Ascend.frmCustomer.fmePOA.cmbPOAStatus.ClickItem("Active")

But when I send a variable looks like it is treating as text and other fields are getting enabled.

Thanks in advance.

 

Code with variable:

Call Aliases.Ascend.frmCustomer.fmePOA.cmbPOAStatus.ClickItem((ProjectSuite.Variables.Translations.Item(ProjectSuite.Variables.Environment,2)))

 

Code with value.

Aliases.Ascend.frmCustomer.fmePOA.cmbPOAStatus.ClickItem("Active")

13 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Show the code where you are using the variable please

    • Raghukatta's avatar
      Raghukatta
      Contributor

      Code with variable:

      Call Aliases.Ascend.frmCustomer.fmePOA.cmbPOAStatus.ClickItem((ProjectSuite.Variables.Translations.Item(ProjectSuite.Variables.Environment,2)))

       

      Code with value.

      Aliases.Ascend.frmCustomer.fmePOA.cmbPOAStatus.ClickItem("Active")

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        instead of

         

        ((ProjectSuite.Variables.Translations.Item(ProjectSuite.Variables.Environment,2)))

         

         

        try

         

        ((ProjectSuite.Variables.Translations.Item(eval(ProjectSuite.Variables.Environment),2)))