Splunk Search

How can I determine if a field is an integer (whole number)

jedatt01
Builder

I want to use an if statement determine if a number is a integer or decimal. Is that possible? example

if(field1/field2 = "whole number","true","false")

0 Karma
1 Solution

woodcock
Esteemed Legend

jedatt01
Builder

Isint() works for what i need. Thanks

0 Karma

micahkemp
Champion

Perhaps a little modulus action:

if(field1%field2==0, "true", "false")
0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...