Including a Calculation in a User Prompt?

Hi folks—

I create new macros exactly often enough that I never seem to develop a full fluency in the logic of things, so I apologize if this is an annoyingly basic question. I'm trying to create a user prompt that adds a number of minutes (variable TimeLimit) to the current time and displays the result to the user.

Here's what I set up:

…and here's what that produces:

I'm sure there's a ridiculously simple fix, but it ain't finding its way into my brain. Any smart people with a moment to set me straight?

Thanks, all!


I think if I am not mistaken you have to define ICUDate as a variable first and in the prompt put %variable% Instead of ICU date


Try to end your chat by %ICUDateTimePlus%TimeLimit%Minutes%h:mm a%

It is failing because in this particular case, the Variable TimeLimit should just be quoted direct (not %Variable%TimeLimit%) as here it is used as a Calculation (i.e. you could have an actual Calculation here like 60 + 1 or TimeLimit -1). It is the same as the way Variables are written without enclosing %s in Calculation Fields.



I'm sure spending some time looking into the role of the "%" symbol in KM would do me lots of good, but I really appreciate the quick fix, Zabobon!

That worked like a charm! :blush:

1 Like