Skip to main content
Solved

Custom Field Invalid Expression statement

  • October 4, 2022
  • 8 replies
  • 329 views

Forum|alt.badge.img+4
  • Do Gooder (Customer)
  • 8 replies

I’m making a custom field to display serial number in Work Task by pulling it from Equipment_Object using the Equipment_Object_API.Get_Serial_No. Though when I go to approve it it displays the below error. The two parameters I have in the expression are the corresponding ones in the JT_Task_UIV view.

 

Best answer by Bhagya Wickramasinghe

Hi @sleigr,

In the slect statement the view is specified incorrectly. It should be “equipment_object” and not “equpiment_object”.
 



Hope this helps!

Best Regards,
Bhagya

8 replies

Technical Outlaws
Hero (Employee)
Forum|alt.badge.img+11

You don’t need to state the application owner against the API, but the arguments should be prefixed with the view notation.  Try the following.

 

Equipment_Serial_API.Get_Serial_No(v.site, v.report_object_id)


Forum|alt.badge.img+4
  • Author
  • Do Gooder (Customer)
  • 8 replies
  • October 4, 2022

Tried that and it still had the error. The JT_Task_CFT table doesn’t exist either in our database, as this will be the first custom field for the view.

 

 


Technical Outlaws
Hero (Employee)
Forum|alt.badge.img+11

Are you absolutely certain that site & report_object_id exist in the view jt_task?!


Forum|alt.badge.img+4
  • Author
  • Do Gooder (Customer)
  • 8 replies
  • October 4, 2022

I checked and JT_Task did not have report_object_id, I was using jt_task_uiv. So I made this instead and it shows this error now.

 


Charith Epitawatta
Ultimate Hero (Employee)
Forum|alt.badge.img+31
  • Ultimate Hero (Employee)
  • 1094 replies
  • October 4, 2022

Hi @sleigr,

Try removing the space in “: objkey”. It should be “:objkey”. 

Hope this helps!


Forum|alt.badge.img+4
  • Author
  • Do Gooder (Customer)
  • 8 replies
  • October 4, 2022

Removing the space worked, it is approved and once it runs it shows this error:

We have a JT_TASK_CFT table but no CFB in our database. Is that the issue here?


Forum|alt.badge.img+13

Hi @sleigr,

In the slect statement the view is specified incorrectly. It should be “equipment_object” and not “equpiment_object”.
 



Hope this helps!

Best Regards,
Bhagya


Forum|alt.badge.img+4
  • Author
  • Do Gooder (Customer)
  • 8 replies
  • October 5, 2022

Guess what, that solved it. A little spelling error….