Skip to main content

How do you get an existing field (not a custom field) to show up on a different page?

I am trying to display the Organization Code (org_code) from the Organization and Position Assignments page (company_pers_assign_act view) on the Purchase Orders Lines (POL) page (purchase_order_line_all view).  So it is an already existing field and not a custom field.  When I try to create a custom field so it will display on the POL page I cannot get it to work.  I have tried Reference (can’t find the field I want to display), Select (mostly get the not a custom field error) and Expression (Mostly get statement is invalid).

I am not 100% sure which is the best route.  I thougtht the expression looked the most promising.  I have tried:

company_pers_assign_api.get_org_code((select assignment_seq_no from company_pers_assign_act where person_id = v.authorize_code))

as the expression.  The get_org_code needs the assignment_seq_no as the parameter which is what the select statement is trying to get.  Looking at the COMPANY_PERS_ASSIGN_ACT view it does look to have assignment_seq_no as one of the fields, but couldn’t get that to work (got statement is invalid).

So, how an I get an existing field to display in a different page not associated with said view/field?

Hi @rvanden5 ,

You use the correct way to create a ‘read only’ field.

But I am not sur what you want to accomplish, Which org code do you want to show?

From which employee/person. This should exist in the PO line, otherwise this will not work.

Please let me know, so I can help you further.

BR,

Robert 


We want coordinator from the purchase order to have their org_code displayed.  This would be the the authorize_code field from the Purchase_order_line_all view.  So if the authorizer/coordinator was JMONTANA from Maintenance, we want to have that org_code displayed on the line with the other data.  Something like:

This ‘Maint’ org_code is hardcoded so is the same for all lines.  This is just for example purposes.

The authorize_code from the Purchase_order_line_all view matches up to the person_id in the Company_pers_assign_act view which holds the org_code we want.


Hi @rvanden5 ,

I managed to created the custom field via a select statement. It should also be possible to do so with an expression, but I have not managed that yet. I used the coordinator of the purchase order, this field is not available on the purchase order line. Hopefully this helps you.

 

You can use the following arguments:

v.ORDER_NO,v.CONTRACT

With the following statement:

select ORG_CODE from IFSAPP.COMPANY_PERSON p
where p.PERSON_ID = IFSAPP.PURCHASE_ORDER_API.get_AUTHORIZE_CODE(:ORDER_NO)
AND p.EMPLOYEE_STATUS = '*'
AND p.COMPANY_ID = IFSAPP.COMPANY_SITE_API.GET_COMPANY(:CONTRACT)


Robert,

Thank you very much for the help.  I had been having no luck figuring that out by myself.  I hope you have a wonderful day.

Thanks,

Ron


Reply