How to type random value into a field

I have a command in macro that makes a random number:

| executeScript | return Math.floor(1 + Math.random()*9998) | random |

When i got a number, i need to put it into a field. How can i do that ?

command

| type | name=booking_details[awb][second_code] | ${random} |

is wrong

Проблема решена. Я запускала команды не сразу, а поочередно, одну за одной. Когда запускаешь одну за одной, после объявления переменной
| executeScript | return Math.floor(1 + Math.random()*9998) | random |
UI.Vision ее тут же забывает, и поэтому
| type | name=booking_details[awb][second_code] | ${random} |
уже выполнить не может. Так просто и странно.

We’ve solved our problem. I’ve run not by playing the whole macro, but one by one. When you do it one by one using double click on each command, after claiming
| executeScript | return Math.floor(1 + Math.random()*9998) | random |
UI.Vision forgets it at once. And then you cannot run this command:
| type | name=booking_details[awb][second_code] | ${random} |