Hello,
I would like ask some help with a "Send To" 4DScript.
I have a queue with two output channels ( Server 1 and 2). Server 1 uses HumanResource and work is regulated by HumanResourceSchedule. Server 2 don't use HR and is available all the time.
Need some help with followong script:
If HumanResourceSchedule Availabilty = 0 (HR available) the product is sent to Output Channel 1,
but if HumanResourceSchedule Availabilty = 1 (down), then Output Channel 2.
Best Regards
"Send to" script which depends on HR availabilty
-
- Posts: 7
- Joined: Monday 02 March, 2015 - 16:34
Re: "Send to" script which depends on HR availabilty
Hello MartinL,
Have a look in the Send To help under no. 10: Conditional Statement. The code of the standard statement would be something like
i.e. if some condition is true, take channel 1, otherwise take channel 2. You just need to adapt the conditional statement to your needs. That would be something like:
The first() statement is due to the inner structure of the HumanResourceSchedule atom (I assume you use the time scheduler).
Have a look in the Send To help under no. 10: Conditional Statement. The code of the standard statement would be something like
Code: Select all
if(1 > 0, 1, 2)
Code: Select all
if(Att([Available], first(refHumanResourceSchedule)) = 0, 1, 2)