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
Firstly, line 13 seems weird to me! I suggest to delete the local!allRole: from this line and declare/initiate in a separate line if you are using in somewhere.
local!allRole:local!allRoles:rule!userinputsheet_Role()
just local!allRole:rule!userinputsheet_Role(),
Make sure to change your dropdown's choicelabel and choiceValue as well to local!allRole . The previous code shows local!allRoles value provided there!
Also, to help you better can you let us know what is the output data from the queryentity within allRole variable? Is it having null data in it somewhere?
yes, there is a null value in that selection results, however i define the operator shouldn't be null in that rule, but why it is still there? how can i do
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.
works!
Happy to be of help!
so grateful!