XREF filtered on specific actions

Posted by Bo Haslund on 05-Sep-2016 13:49

Hi guys,

I'm often looking to find where a specific pfile object is created, deleted etc. That is a filtered "where use" report.

In the GUI version I create a "Where used" report, copy it to a text file and execute some simple code like (in case of Delete):

DEFINE VARIABLE ich AS CHARACTER NO-UNDO.

INPUT FROM c:\temp\xref_i.txt.
OUTPUT TO c:\temp\xref_o.txt.
REPEAT:
   IMPORT UNFORMATTED ich.
   IF INDEX(SUBSTRING(ich,81),"D") > 0 THEN
      PUT UNFORMATTED ich SKIP.
END.
INPUT CLOSE.
OUTPUT CLOSE.

Is there a more simple way that I have overlooked?

Regards,

Bo 

All Replies

Posted by Jeff Ledbetter on 05-Sep-2016 13:56

Hi Bo.

If I understand, you would like an easier way to not only see where an Object (PFILE in this case) is used, but want the ability to only display references for a specific type of usage?

"Computer, show me everywhere a Customer record is deleted."

Is that correct?

Posted by Bo Haslund on 05-Sep-2016 14:10

Hi Jeff,

Yes, that's what I need :-)

//Bo

Posted by Jeff Ledbetter on 05-Sep-2016 14:18

Thanks for the clarification. :)

There is no "easier" way right now as the filter criteria is just based on the type of reference and not the action. That is a pretty good idea though.

The reports (and report UI) are available as source so it may be feasible to modify as needed for your requirements. Take a look at rtb/p/rtb_rpt_xref.p and rtb/w/rtb_objxrefsrpt.w.

Posted by Bo Haslund on 05-Sep-2016 14:29

Thanks for the input Jeff. If I change the files rtb/p/rtb_rpt_xref.p and rtb/w/rtb_objxrefsrpt.w in a way that is generally useable I will upload them in this thread.

And yes I think is a pretty good idea also, and wonder why no one came up with it within the last 10 years, but maybe we all just program it? Carl?

Posted by Jeff Ledbetter on 05-Sep-2016 14:33

I will add it to our CR list.

The tabletop Where Used view is sortable by action so that may help you group them together.

Posted by Bo Haslund on 05-Sep-2016 14:44

Hi Jeff,

I did sort (as the first) on action, but that did not help me much. The D is anywhere in the sequence of action letters, and in our case it was in around 20 out of 1000 objects.

:-) Bo

This thread is closed