Skip to main content

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, 

 

 

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

 


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


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


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