Handling null values in a parameter

We have an embedded dashboard using a SPICE dataset that is the result of a join of two other datasets, resulting in null values for some fields. We are using parameter based filters and have multiple-value string parameters connected to controls populated with the values from the corresponding fields.

This results in some filter controls showing NULL as an option. If this option is one of the selected items, the UI gets null back from getParameters().

When the UI sends the parameters to the dashboard, it is sending in the original null, but the control now shows null selected and NULL is not selected. Calling getParameters() again returns the string, "null" instead of the original null value. It appears that when sending a null in as a parameter value, QuickSight is changing it to a string.

Example of the drop-down controls (before saving the parameters to the UI and after passing them back to the dashboard)

How can we pass null back to the embedded dashboard and have QuickSight recognize it properly?

One workaround we thought of is to change all null values in the dataset to a string value to indicate null (“–NULL–”, etc), but we would like to avoid increasing the size of the dataset, if possible.

Hi @MikeB,

This should be supported. Take a look at this:

@David_Wong ,

Thank you for the reply. I thought it would be supported, but it appears that QuickSight is changing null to "null" (from null to a string) when the parameter is passed to the embedded dashboard. Our UI developer has verified that we are passing in null (just null, not the string). If QuickSight kept that as null, I would have expected it to select(check) the original representation in the drop down list (NULL), but instead it added the string version "null" to the list and selected that. It then returns the string, which is not in our data, from getParameters().

Hello @MikeB and @David_Wong !

@MikeB were you able to find a workaround for this issue or are you still running into this problem? If you did find a workaround, could you share it to help the community?

Depending what you are expecting vs what is in the documentation I might suggest an AWS support ticket.

Hello @MikeB and @David_Wong !

@MikeB Are you still running into this issue? Again, my recommendation is to file a support ticket if the documentation is saying that your use case is supported but you are running into issues.

Hello @MikeB and @David_Wong !

I am going to archive this for now. @MikeB, again I recommend filing a support ticket with AWS but in the meantime if you have another question please feel free to post a new topic at the top of the community!