How to filter a field in class and representation?

Happy new year to everyone.

I wanted to get this information out before end of the year, but there was not time, so now it’s going to be my first blog entry for 2017 (happy blogging)

Previously here, I discussed “A very basic example of V7 style coding with Representation and Class”.
Because of that I received a question on, how do you filter a field in representation? Or how do you set up a lookup on a representation field.

In this blog entry ,I like to present you the answer to the above questions.
Before we get to point, check out two online help entry “How to modify the selections query facet for a standard data table” and “How to filter rows in a standard query facet”

Both are searchable from online help ...

The above online helps talk about how the look up works on a field and how you can manage the lookup.

Now here is the example, (my example here is based again on ZCLIENT class which was previously discussed.) I am going to add a field to my representation which will have a lookup based on Item list and then I will further filter the lookup.

  1. Add a CLIENTITM field to my ZCLIENTH table, which is with standard ITM data type.

  2. Save and Validate.
  3. Open Development, Data and parameters, Classes, Classes.
  4. Add my new field to my existing ZCLIENT class, by using Column selection

  5. Save and Validate.
  6. Open Development, Data and parameters, Classes, Representations.
  7. Click on Displayed Properties.
  8. Add my new Class property to the representation.

  9. Save and Validate.
  10. Now if I go to my ZCLIENT Representation I would have a new field that automatically has a look up and it loads the field automatically based on ITMMASTER representation.

Now let’s say I want to add additional filter to this look up and only show the items that has a specific UPC code,
Note: Like any development topic there might be other ways, but below is one way to accomplish this requirement.

I know this look up is based on ITMMASTER representation, how do I know that?

  1. Back on my ZCLIENT representation click on Links tab, and check mark Display of Generated links.

  2. Now I am going to follow the online help example 2 that is listed under “How to modify the selections query facet for a standard data table” entry.
  3. Back in Representations, located ITMMASTER representation.

  4. Create a copy of this representation ( Follow the proper naming) I just used ZITMMASTER, then click on Organization tab.

  5. Scroll down to see the filter block and add the proper filter that you like, in this case I like to filter and show specific EANCOD.

  6. Save and Validate.
  7. Now go back to ZCLIENT representation and Links tab make the ALOOKUP to be inactive.

  8. Save and Validate.
  9. Now if you launch your representation you will see below. 


You can set up, lookup and filter the look up of a property in a representation.

What is next:

In future blogs I am going to show how you can make this representation available in REST web services.

  • Hi Esfahani,

    This tutorial helped me a lot but doesn't solve all of my problems...

    I need the filter to be dynamic based on some characteristics from another field in the same representation, and not only based on the table.

    Can you please help me with that?

    Thanks for the help so far, it has been great so far.