Reg: Flow design inline script

pavana1
Tera Contributor

Dear Team,

 

I have created one catalog form and flow design in my form Planned start date and planned end date fields are there 

example : Step 1 : catalog form -> Planned start date : i have given 22/04/2024 and planned end date : 30 /05/2024  -> with this one record created  

Step 2: flow design ->One of condition i am trying to display  Planned start date (22/04/2024) this part i mapped catalog variable planned start date working fine .

and Planned End date  i have to display end date is 02/05/2024 (means 02nd May 2024) for this i am training inline script like below code :

var currentDate = new GlideDateTime();
var varPlannedStartDate=fd_data._1__get_catalog_variables.planned_start_date;
currentDate.setValue(varPlannedStartDate);

var daysUntilTuesday = 9 - currentDate.getDayOfWeek(); 
var nextTuesday = new GlideDateTime();
nextTuesday.addDays(daysUntilTuesday);

// Set the time to the beginning of the day (midnight)
nextTuesday.setHourOfDay(0);
nextTuesday.setMinute(0);
nextTuesday.setSecond(0);
return nextTuesday;

but planned end date  : calculated from var currentDate = new GlideDateTime(); i have to calculate 22/04/2024 (planned start date ) from this date 2nd week 2/05/2024 should display in my planned end date  (using this flow design i am creating one record in release table)

Example : form whatever given dates i have setted in rm_release_scrum table like planned start is 22/04/2024 and end date is 30/05/2024

in that it will create release_phase table one more record like planned start is 22/04/2024 and Planned end date should be 02/05/2024 -> for this only flow design i am written inline script . date displaying this month date like(2024-02-15

and see the screen shorts please help me how to do in flow design inline script 

if i will clear i can do for other validations easily thank you in advance 

 

Thanks & Regards,

bandi

 

0 REPLIES 0