Reporting

Fieldformat Command: Why does the number format display correctly in the Search App, but not in a scheduled email report?

emafront
Explorer

hi all,
when i try to format a number in splunk, it displays correctly in the search app, but when i schedule it to be forwarded by mail the formatting is lost
index=... | fieldformat Amount=tostring(Amount, "commas")

Splunk 6.1.3

Any help?
thanks

1 Solution

gkanapathy
Splunk Employee
Splunk Employee

the fieldformat command only affects how the data is displayed by web UI elements. It does not modify the data itself. When you send via email, you're sending the data. You will need to use eval instead of fieldformat if you want to change the sent data.

View solution in original post

gkanapathy
Splunk Employee
Splunk Employee

the fieldformat command only affects how the data is displayed by web UI elements. It does not modify the data itself. When you send via email, you're sending the data. You will need to use eval instead of fieldformat if you want to change the sent data.

emafront
Explorer

great, thanks!!

0 Karma

jamesdaily
Explorer

This is confusing because when you Export the report results from the UI, the date format is preserved, but when you let Splunk email it on a schedule, the date format is lost.

It should at least be made consistent... As it stands, it's impossible to test report output without scheduling a report and reviewing the email.

0 Karma
Get Updates on the Splunk Community!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability As businesses scale ...