- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how to set null value ?
WXY
Path Finder
11-05-2018
05:29 PM
If the field value is null, the value is null, and if it is not controlled, it is still the original value
I want to get a field value ,if it is null ,I set it null,if not ,I hope it still the original value
I use :
index = abc_text | eval Codelocation = if(isnull(Codelocation), "null",Codelocation)|stats max(_time) as _time values(Codelocation) as codelocation by source
It did not achieve the desired effect.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
zihenggong
Engager
03-16-2020
11:37 AM
use null() instead of "null"
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

renjith_nair
Legend
11-05-2018
06:33 PM
@WXY, just a clarification - if the value is null why do you want to set it again to null ? Do you mean you want to convert "space" to null.
Anyway try this |eval Codelocation = if(isnull(Codelocation), null(),Codelocation)
---
What goes around comes around. If it helps, hit it with Karma 🙂
What goes around comes around. If it helps, hit it with Karma 🙂
