How do I populate a field(Drop down) in Appian using Fitnesse which is present under a section but has no label.

Here is the piece of code for reference:-

a!sectionLayout(
      label: "Select Relationship Type",
      contents: {
        a!columnsLayout(
          columns: {
            a!columnLayout(
              contents: a!dropdownField(
                label: "",
                choiceLabels: {
                  local!relationTypeLabels
                },
                choiceValues: {
                  local!relationshipTypeCodes
                },
                placeholderLabel: " --- Select a Value --- ",
                value: ri!entityType,
                saveInto:{
                  ri!entityType,
                  if(
                    rule!APN_isBlank(ri!entityType),
                    {
                      a!save(ri!primaryEntityData,{}),
                      a!save(ri!secondaryEntityData,{}),
                      a!save(ri!isAltSCSelected,null),
                      a!save(ri!isSelected,null),
                    },
                    {}
                  )
                }
              )
            ),
            a!columnLayout(
              rule!SCE_dummyTextFieldForExtraSpace()
            )
          }
        )
      }

  Discussion posts and replies are publicly visible

Parents
  • I would recommend trying to index into the field since it does not have a label. You can find the first drop down field on the form based on logical order (section -> column left to right, etc.) and fill it in accordingly.

    The following was pulled from a working script I have that has multiple paragraph sections:
    |populate |paragraph| field |[1]| with |Lorem ipsum|

    This example shows how you might be able to do the same for drop down components.
  • Thanks for your inputs.

    The suggestion which you gave only works for FIELD_TYPEs of TEXT, PARAGRAPH, and FILE_UPLOAD but not dropdown.
  • I created the same interface using your code snippet and used the following script successfully:

    |click on menu |Actions|
    |click on action|Miccile Fitnesse Testing|
    |populate field | [1] | with |Test2|

    I had {"Test1","Test2","Test3"} as the choiceLabels and choiceValues in my dropdown and the script made the dropdown selection seamlessly. If you are having troubles beyond this, you may want to look at the setup and not the script itself. I have seen issues with scripts filling out form fields when FitNesse installations are done incorrectly and when |set appian version to| is not set to the correct version of Appian.
Reply
  • I created the same interface using your code snippet and used the following script successfully:

    |click on menu |Actions|
    |click on action|Miccile Fitnesse Testing|
    |populate field | [1] | with |Test2|

    I had {"Test1","Test2","Test3"} as the choiceLabels and choiceValues in my dropdown and the script made the dropdown selection seamlessly. If you are having troubles beyond this, you may want to look at the setup and not the script itself. I have seen issues with scripts filling out form fields when FitNesse installations are done incorrectly and when |set appian version to| is not set to the correct version of Appian.
Children