Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody,
I have a question regarding a function that I have set up to record all the production operations of a lathe until 19 o'clock. Now I don't want to record until 19 o'clock, but as long as the machine is operated by production staff.
This information is stored in an event log. If the machine.event = 'manned', the machine.event.end should be used as the end time (at the position of 19). The current function is:
sum ({<LatheStatistics.START_TIME = {"= hour (LatheStatistics.START_TIME) <19"}>} LatheStatistics.END_TIME-LatheStatistics.START_TIME) * 24
How should I phrase the expression if I want : if (machine.event = "manned", hour (machine.event.end)) instead of 19?
Many Thanks,
Dominic
Do you mean this?
sum ({<LatheStatistics.START_TIME = {"= hour (LatheStatistics.START_TIME)<if (machine.event = "manned", hour (machine.event.end))"}>} LatheStatistics.END_TIME-LatheStatistics.START_TIME) * 24
Or
sum ({<LatheStatistics.START_TIME = {"=if (machine.event = "manned", hour (machine.event.end))"}>} LatheStatistics.END_TIME-LatheStatistics.START_TIME) * 24
Do you mean this?
sum ({<LatheStatistics.START_TIME = {"= hour (LatheStatistics.START_TIME)<if (machine.event = "manned", hour (machine.event.end))"}>} LatheStatistics.END_TIME-LatheStatistics.START_TIME) * 24
Or
sum ({<LatheStatistics.START_TIME = {"=if (machine.event = "manned", hour (machine.event.end))"}>} LatheStatistics.END_TIME-LatheStatistics.START_TIME) * 24
Thanks for replying!
I mean the first variant.
But it doesn't work at all!
When you say, It is not working. My suggest would explain way like
1) Where it is not working
2) What it is not working
3) If this expression says okay, Does values are not matched?
etc.
My fault, it works!
Thank you!