Solved

Custom Field Invalid Expression statement

  • 4 October 2022
  • 8 replies
  • 77 views

Badge +2

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.

 

icon

Best answer by Bhagya Wickramasinghe 5 October 2022, 06:16

View original

8 replies

Userlevel 5
Badge +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)

Badge +2

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.

 

 

Userlevel 5
Badge +11

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

Badge +2

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.

 

Userlevel 7
Badge +21

Hi @sleigr,

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

Hope this helps!

Badge +2

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?

Userlevel 5
Badge +11

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

Badge +2

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

Reply