cancel
Showing results for 
Search instead for 
Did you mean: 

Print UDF in repetitive area and relate it to another table

Former Member
0 Kudos

I have created a UDF in Marketing Docs (A/R Inv - Rows). I need to print the value on the UDF and relate it to CardCode in OCRD to subsequently display the CardName in the repetitive area on the A/R Invoice.

I can print the UDF OK. When I add Text fields with source Database from Table OCRD, the entire repetitive area no longer prints.

Any ideas?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Are you originally from WBF in Sydney?

Former Member
0 Kudos

Thank you all. I ended up creating UDFs on the A/R Invoice rows. PLD worked fine in the end.

former_member583013
Active Contributor
0 Kudos

Is the CardName you are trying to print in the repetitive area different than the CardName of the BP on the marketing document. Or Is it the same BP Name.

Please give an example with your scenario so that we could suggest a better solution.

Best wishes

Suda

Former Member
0 Kudos

Hi Suda

In this case there is a BP (a hospital) that gets invoiced for Rental of medical equipment. They then cross charge another BP (patient) for the goods. ie the Patient code and name needs to print on the line of the A/R Invoice. The patient code and name is different to the BP code and name on the A/R Invoice Header.

Thanks

Former Member
0 Kudos

Hi Peter,

The easiest way to do this is to create a UDF on the marketing document line to capture the BP Code for the patient and create an UDF on the line to capture the Patient Name.

The Patient Code (PCode) field will be alphanumeric 15 characters.

The Patient Name (PName) field will be alphanumeric 100 characters.

You can add a formatted search to the PCode field to lookup the BP Code for the patient.

SELECT T0.[CardCode] FROM OCRD T0

this query can be made more complicated, for example you can filter by customer group if your patients all belong to that group.

You can then add the following formatting search to the PName field:

SELECT T0.[CardName] FROM OCRD T0 WHERE T0.[CardCode] = $[$38.U_PCode.0]

You can make the PName formatted search auto refresh when you exit the patient code column.

I hope this answers your question. You can then print both UDFs on the marketing document layout.

Kind regards,

Adrian

Former Member
0 Kudos

Hi Peter

You can create a User Table with all your CardCodes & CardNames. I presume your UDF will contain a Code corresponding to the CardCode you want to display on the lines. When you relate the fields from the User table to the UDF in your layout, SBO print layout displays the correct info.

It is a bit of a roundabout way to do things but I get the same problem as you did when I use the OCRD table. Somehow SBO does not recognise the relationship.

Regards

Daan