☝️Small business or a startup? See if you qualify for our special offer.
+

Overwirte a column to null

Answered
jhshin asked on August 5, 2025

We are developing a custom api.
When grouped based on a row, the calculated values for 'a' and 'null' come in response.
However, Flex Monster overwrites 'a' to the value of 'null'.
Therefore, the expand operation performed when 'a' is pressed sets the 

filter.member.include part to 'null', not 'a'
I want both 'a' and 'null' to be rendered on the screen.

 

9 answers

Public
Maksym Diachenko Maksym Diachenko Flexmonster August 6, 2025

Hello,

Thank you for reaching out to us.

As for the issue with setting the value of "null" to the "a" value, this is caused by null IDs defined in the /members response. We have described this matter in more detail in your previous ticket: https://www.flexmonster.com/question/the-pivot-table-does-not-show-all-field-values/#answer-74724

To show empty members on the grid, we suggest following these steps:

  • Return a member with the null value:
"members": [{
  "value": "green"
},{
"value": "blue"
},{
"value": null
}]
  • In the /select response, return the "keys" object with member value set to an empty string:
"values": {
"Price": {
"sum": 679804
}
},
"keys": {
"Color": ""
}

We are looking forward to hearing your feedback.

Best Regards,
Maksym

Public
jhshin August 7, 2025

Thank you. now I can see 'null' key as (blank) in grid.

but I got additional problem. 

I want to group **Name as 'null', but request body sends filter.include.member as "".

To get right result, I think filter.include.member should be set null.

Is there any options to change "" to null in filter.include.member ?

Public
Maksym Diachenko Maksym Diachenko Flexmonster August 7, 2025

Hello,

Thank you for reaching out to us.

Please note that, by default, Flexmonster is grouping all possible empty values as a single "(blank)" member, which includes null, undefined, and empty string. With this setup, the component requires the empty member to be specified as an empty string in the /select response. This is required for the unification logic.

With the distinguishNullUndefinedEmpty option, Flexmonster will consider null, undefined, and an empty string to be different members. With this option specified, you should return the original member value like null in both /select and /members requests. However, it would disable the grouping of different variants of empty members, as is shown in this example: https://jsfiddle.net/flexmonster/czf507my/

Please let us know if our recommendation helped you.

Best Regards,
Maksym

Public
Chern Yu Zi August 10, 2025

Hello Maksym, 

I realised distinguishNullUndefinedEmpty is not a specified type in Options inside flexmonster.d.ts file, leading to a typescript error. Will this be fixed? 

Thanks!

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster August 11, 2025

Hello,

Thank you for reaching out to us.

Our team will add the distinguishNullUndefinedEmpty option to the flexmonster.d.ts file and provide a fix with our minor release with the ETA August 18th. We will notify you about the release.

Please let us know if other questions arise.

Kind regards,
Nadia

Public
jhshin August 12, 2025

Our license is Single Corporate License  > Premium Support Perpetual license
Can we use released version(8/18)? 

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster August 12, 2025

Hello,

Thank you for the question.

Yes, you can update Flexmonster to the next version, which has an ETA of August 18th. Your Customer Service Manager has emailed you.

Please let us know if other questions arise.

Kind regards,
Nadia

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster August 18, 2025

Hello,

We are happy to let you know that the distinguishNullUndefinedEmpty property was added to the flexmonster.d.ts file.

This fix is provided in the 2.9.110 version of Flexmonster: https://www.flexmonster.com/release-notes/version-2-9-110/

You are welcome to update the component. Check out our updating tutorial for guidance: https://www.flexmonster.com/doc/updating-to-the-latest-version/

Please tell us if the fix works. Looking forward to hearing from you.

Best regards,
Nadia

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster 8 hours ago

Hello,

Hope you are having a great week!

We were wondering if you had a chance to check the updated version. Could you please confirm if it works for you?

Looking forward to hearing your feedback.

Kind regards,
Nadia

Please login or Register to Submit Answer