FLOW Designer, conditons
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Preciso criar um flow com condição de hora, exemplo: Se a reserva da sala for >10 OU após as 18h faça X coisa, porém o campo de condição só me retorna datapill, não consigo preencher o horario.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @conceicaog , Please do a following:
- Create a Flow Variable of type String (for example name it as is_after_6pm). You can create flow variable from the three dot available on the top
- Create first step as 'Set Flow Variables' (select it from the Flow Logic) and use below script. To use script first click on the Toggle script option as below:
Script:
var now = new GlideDateTime();
var localDisplay = now.getDisplayValueInternal();
var timePart = localDisplay.split(' ');
var currentHour = parseInt(timePart[1].split(':')[0], 10);
if (currentHour >= 18) {
return "yes";
} else {
return "no";
}
- Now, use this variable is_after_6pm is yes in the time condition along with Reservation Count > 10
Should you need any further assistance, please let me know.
Regards,
Nishant