Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • AWSでJIRAを建てたが「最近作成された課題グラフ」でY軸文字(縦)が豆腐になる

Automations: how to use a variable inside a smart value list.get()

Eric Rodewald
Contributor
September 10, 2020

I am trying to pull a random item out of an array from a json webhook request. I've got the following done:

 

  1. create variables rand, listSize, newIndex
  2. run the webhook request, delay for response
  3. (works) set rand to:
    {{#=}}RANDOM(){{/}}
  4. (works) set listSize to:
    {{webhookResponse.body.size}}
  5. (works) set newIndex to:
    {{#=}}FLOOR({{listSize}} * {{rand}}){{/}}
  6. (works) verify this index is not a string by setting newIndex again to:
    {{newIndex.asNumber}}
  7. (fails) obtain by the new index with:
    {{webhookResponse.body.get(newIndex)}

Unfortunately, this doesn't work at all. I've tried variations like:

{{webhookResponse.body.get({{newIndex}})}} 

 

 When I just use a raw literal number, it works fine. e.g.,

{{webhookResponse.body.get(0)}} 

Not really helpful if I'm building a random function, basically.

 

Am I missing some nuance about the syntax here? Thanks

1 answer

1 accepted

3 votes
Answer accepted
N-A okuda
Contributor
October 2, 2017

とりあえず表示できるようになりました。

sudo yum install ipa-gothic-fonts.noarch

ありがとうございました

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events