Skip to main content
Question

Get specific Data from a PU Query not only PU_FIRST or PU_LAST

  • September 21, 2023
  • 1 reply
  • 26 views

Forum|alt.badge.img+3

Hi guys,

 

im looking for a way to obtain data from a different table which is not directly connected to my main table, therefor i need a PU Query.

 

Example:

 

Table 1: Part Table

Table 2 (not connected): Part Specials Table with each x rows for 1 Part.

 

Here I want to check if the part specials table has a specific value in in, for example 'TestA', since the values in part special dont have a strict order I cant use PU_FIRST or PU_LAST.

 

Do you guys know a way to get the information from that table?

 

Thank you and best regards

1 reply

janpeter.van.d
Level 12
Forum|alt.badge.img+26
  • Level 12
  • 496 replies
  • September 21, 2023

Hi @jurgen.gakov ,

 

In a PU function, you can specify a filter statement at the third position. If you only want to now if the value exists, I suggest to use something like:

 

PU_COUNT("Part Table", "Part Specials Table"."Column", "Part Specials Table"."Column" = 'TestA')

 

If this returns the number of rows that contain this value.

 

For more info, see PU_COUNT (celonis.com)

 

I hope this helps.