Adding value in request response to now

Ömer - OBSS February 2, 2023

Hi everyone,

I'm trying to add the value from the rest response over the current date;

To access the variable i am using;

{{webhookResponse.body.table.body.rows.valueColumns.value.get(0)}}

This gives me a decimal number like 87.5 which represent hours.

I need to add this value on current date with plusHours method. I tried many methods but i couldn't make it;

{{now.plusHours( {{webhookResponse.body.table.body.rows.valueColumns.value.get(0)}} )}}
{{now.plusHours({{asNumber}}{{webhookResponse.body.table.body.rows.valueColumns.value.get(0)}})}}

{{#webhookResponse.body.table.body.rows.valueColumns}}{{now.plusHours({{value.get(0)}})}}{{/webhookResponse.body.table.body.rows.valueColumns}}

None of these methods work.

On cloud i am using Create Variable action to assign this value on a variable but on datacenter Create Variable action not available. So I am trying to use access directly to variable. 


I'm open to all advice, thanks !

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2023

Hi @Ömer - OBSS 

Once inside a set of curly-brackets you do not need to repeat them.  Please try this:

{{now.plusHours(webhookResponse.body.table.body.rows.valueColumns.value.get(0).asNumber)}}

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events