Is there a way to invoke an intent from a dashboard so that my app receives the relative timeframe as… a relative timeframe?
In more detail…
I have an app that receives a timeframe via an intent. There is one required key field, with dt.timeframe being in the intent but non-required.
The intent can be triggered using ‘open with’ from a dashboard DQL table containing a column matching the name of the key field.
All of that works…
What is not so good is that if the dashboard has a Timeframe of, say, ‘now-30d’, when the intent is triggered it always seems to convert the begin and end values to absolute time values. The URL invoked contains the absolute times encoded as HTTP query parameters… I think this conversion happens before my app is involved in the process.
Is there a way to invoke an intent from a dashboard so that my app receives the relative timeframe as… a relative timeframe?
It seems to be possible for built-in DT things to do this when invoking each other.
can you please share your lastIntent from top context in custom app, following an example here: Debug intents | Dynatrace Developer. Here we will be able to see the timeframe passed.
This was passed when using ‘Open Field With’ from the legend of a bar chart on a dashboard. The timeframe on the dash was ‘last 10 minutes’… apart from not being passed as a relative value, it kinda looks like 11 minutes to me.
Are you sure the time selector was set up as the last 10 minutes? Since the only way to get that kind of timeframe for me is to manually select that timeframe, otherwise object looks like this:
Also the relevant part of the config showing the schema for the timeframe parameters (the app also allows timestamp… but that is not being used when drilling from a dashboard graph series)
I’ve been taking a look at your situation and as you said, whenever you open an intent from a chart legend, the intent contains the timestamp instead of the relative time.
kindly check the below example mentioned in the docs to receive intent, i think it’s useful to know what is the available payload properties and i think you can convert it to relative time programmatically within your intent receiver function