For drop downbox choiceValues are being empty

 a!dropdownField(
                label: "Role",
                placeholder: "All Roles",
                choiceLabels: local!allRoles,
                choiceValues: local!allRoles,
                value: local!Role,
                saveInto: local!Role,             
              ),

The error report:A dropdown component [label="Role"] 
has an invalid value for "choiceValues". Choice values cannot be null.

local!allRole:local!allRoles:rule!userinputsheet_Role()
which is as below:
 a!queryEntity(
    entity: cons!user_input_sheet,
    query: a!query(
      pagingInfo: a!pagingInfo(
        startIndex: 1,
        batchSize: 50,
      ),         
      aggregation:a!queryAggregation(
        aggregationcolumns:{
          a!queryAggregationColumn(field:"ROLE",isGrouping:true),
        }
      ),
      filter:a!queryFilter(
        field:"ROLE",
        operator:"not null",
      )
    ),
  ).data.ROLE

  Discussion posts and replies are publicly visible

Parents Reply
  • +1
    Certified Lead Developer
    in reply to immortalvirgil

    I would usually either

    1. check the data in database, if any row has blank data in it. Database normally treats ""(blank data) and NULL differently! If possible update the workflow such that either row has data (not blank "") or its NULL. This can resolve the issue that you are facing

    2. If not 1, then you can try adding another filter that checks for field <> "". 

    3. Last but not the least, you can also try to use fn!reject function to reject the null data from the query entity output. Check documentation here.

Children