Saving null when selecting placeholder on dropdown

Let's say I have the following query where the data is being filter based on siteIds

local!estimations: rule!EEP_QE_getEstimations(
    statusId: cons!EEP_VAL_STATUS_ACTIVE,
    columns: {"site_id_fk", "status_id_fk", "estimation_business_id", "id_pk"},
    siteIds: local!selectedSite
  ).data

Now, I'm saving local!selectedSite using a dropdown menu

a!dropdownField(
              label: "Site",
              labelPosition: "ABOVE",
              placeholder: "--- Select a Value ---",
              choiceLabels: local!sites.name,
              choiceValues: local!sites.site_id,
              value: local!selectedSite,
              saveInto: local!selectedSite,
              searchDisplay: "AUTO"
            )

the value of local!selectedSite is null at the start so everything is queried, as expected. If I select a value from the dropdown the data is filtered accordingly. But when I select a value and then I select the placeholder, the query does not return any values. I've checked the value of local!selectedSite and it's null when the placeholder is selected. I've seen this behavior before and my fix has always been to either have another local in the dropdown to save into, check for null and save the correct value(or null) into the filter variable. I can also do the check in the query. Easy fixes but, I'm still wondering why this happens. What causes this behavior with Appian?

Additional notes: siteId parameter in the expression rule is of type integer array, if that matters.

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data