Hi, i’m new to flows so aplogies if this is simple but i couldn’t see an answer anywhere.
As part of my flow, i need to use today’s date, as a string in format YYYY-MM-DD, as a variable in an If block. In the screenshot i need to replace “2024-02-26” with a varibale for current date
I was able to set a global variable in a pre-request script for a GET API call using:
const moment = require(‘moment’);
pm.globals.set(“currentDate”, moment().format(“YYYY-MM-DD”));
However, it doesn’t appear that i can reference the global variable in the IF block and i can’t see how to set a local variable from the global.
Any help would be much appreciated
Thanks
Andrew