Skip to main content
Solved

Custom Field on WO PR Lines


Forum|alt.badge.img+11

I am trying to create a Custom Field on the Purchase Order that pulls the Lead Engineer from a WO into the PO as the Order Contact.

 

I am trying to get this to work and having problems doing so, it is not showing an error but I am not seeing the Lead Engineer. Just the first assigned Engr.

 

What would my SQL be for this, I have tried:

Select RESOURCE_ID from JT_EXECUTION_INSTANCE_UIV WHERE WO = :WO AND TASK_LEADER_DB IS NOT NULL

and I have also tried:

Select RESOURCE_ID from JT_EXECUTION_INSTANCE_UIV WHERE WO = :WO AND TASK_LEADER_DB = TRUE

Can anyone help with the SQL?

 

Thanks, 

 

 

Best answer by DanTrayton

Hi @lisa.gilesAB 

Could you try in your SQL Statement putting single quotes around the TRUE value

Select RESOURCE_ID from JT_EXECUTION_INSTANCE_UIV WHERE WO = :WO AND TASK_LEADER_DB = ‘TRUE’

Kind Regards,

Dan

View original

4 replies

Forum|alt.badge.img+7
  • Sidekick (Customer)
  • 15 replies
  • June 14, 2023

Hi @lisa.gilesAB ,

Just looking at your question - I just wanted to check is your SQL returning a value but the value it is returning not the one you were expecting to see?

Also just wanted to check which version of IFS are you currently running?

Kind Regards,

Dan

 


Forum|alt.badge.img+11
  • Author
  • Sidekick (Customer)
  • 99 replies
  • June 14, 2023

Hi @DanTrayton,

It is returning a value just not what is required.

Example: Dave Beeby is the Task Leader so I want him to be pulled into the Requisition but it is pulling Phil Milner as that is the first in the list

 

We are running Apps 10 UP 18


Forum|alt.badge.img+7
  • Sidekick (Customer)
  • 15 replies
  • Answer
  • June 14, 2023

Hi @lisa.gilesAB 

Could you try in your SQL Statement putting single quotes around the TRUE value

Select RESOURCE_ID from JT_EXECUTION_INSTANCE_UIV WHERE WO = :WO AND TASK_LEADER_DB = ‘TRUE’

Kind Regards,

Dan


Charith Epitawatta
Ultimate Hero (Employee)
Forum|alt.badge.img+31

Hi @lisa.gilesAB,

In addition to what Dan has mentioned above, in the JT_EXECUTION_INSTANCE_UIV, there is no column clalled WO. It should be corrected as WO_NO. So the query should ideally be as follows:

SELECT resource_id from JT_EXECUTION_INSTANCE_UIV WHERE wo_no= :wo AND task_leader_db= ‘TRUE’

Hope this helps!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings