Skip to main content
1-Visitor
December 21, 2021
Solved

Service Help

  • December 21, 2021
  • 1 reply
  • 2770 views

Hi I am still trying to learn java whilst trying to develop my thingworx app and I am trying to write a service to define the production shifts depending on if a boolean property is true and and shift has been selected from a drop drown (string) but services keeps failing saying specific shift (string) is not defined see image. Do I need to do a function call to return the string?

Carl985_0-1640111279360.png

 

Best answer by Carl985

Fixed it now needed 

 

const d = new Date();
let time = d.getHours();

1 reply

5-Regular Member
December 22, 2021

Hello @Carl985 , 

 

Can you please share the error you are getting?

 

Regards

Bhawna

Carl9851-VisitorAuthor
1-Visitor
December 22, 2021

Hi Bhawna

 

Please see below

Carl985_0-1640185012695.png

Regards

Carl

16-Pearl
December 24, 2021

@Carl985 

 

I reviewed your code and it seems fine. I also did a quick test and I am able to execute a similar service on my local instance. 

Please enable debug logging in script logs and after replicating the issue again provide us the Script and ScriptError logs to check the exact cause.

 

Regards,

Sachin Sharma