How are Parameterized Lookups setup in PPM?

Document ID : KB000011248
Last Modified Date : 14/02/2018
Show Technical Document Details
Question:

How are Parameterized Lookups setup in PPM?

Scenario: Bob's Shirt Shop would like to use Clarity to keep track of compatible print methods for printing names, logos and numbers on various garments. (i.e., "screen printing" or "direct to garment" work well on a towel, but a heat transfer would create a mess)

ANSWER:

  1. Create a master object called "Garment" with an id of "garment" and Save.

  2. Create a new string attribute called "Print Method" with an id of "printmethod".

  3. Add the attribute to the properties view for the "Garment" object via [Layout: Create].

  4. Create a new lookup called "Garments" with an id of "garments". The lookup should use a dynamic query.

    1. Submit
    2. Type in the query text:

      SELECT @SELECT:garment.name:GarmentName@
      FROM ODF_CA_GARMENT garment
      WHERE @FILTER@
      GROUP BY garment.name

      Note: In this example, the hidden key is the same as the name, since our garment to print method will have multiple mappings (hence the need for "group by").
    3. Save and Continue.
    4. Specify "garmentname" as the display attribute on the Lookup Properties:Parent Window page.
    5. Save and exit

 

  1. Create a new lookup called "Print Methods" with an id of "printmethods". The lookup should use a dynamic query.

    1. Submit
    2. Type in the query text:

      SELECT @SELECT:garment.printmethod:printmethod@ FROM ODF_CA_GARMENT garment WHERE @FILTER@ AND (@WHERE:PARAM:USER_DEF:STRING:GARMENT@ IS NULL OR @WHERE:PARAM:USER_DEF:STRING:GARMENT@ = garment.name)
    3. Save and Continue
    4. Specify "printmethod" as the display attribute on the Lookup Properties:Parent Window page.
    5. Save and exit

 

  1. Create a new master object called "Print Job" with an id of "printjob" and Save.

  2. Create a new attribute called "Preferred Garment" with an id of "garment".
    1. Choose Data Type of Lookup
    2. Choose Lookup of "Garments"
    3. Submit

 

  1. Create a new attribute called "Print Method", with an id of "printmethod"
    1. Choose Data Type of Lookup
    2. Choose Lookup of "Print Methods"
    3. Check value required
    4. Save
    5. Under Lookup Parameter Mappings specify "garment" for the Lookup Parameter "garment".
    6. Submit

 

 

  1. Navigate to the Object Definition: Views page for the "Print Job" object.

  2. Add the "Preferred Garment" and "Print Method" to the properties view of the "Print Job" object.

  3. Navigate back to the properties view row, click the [Fields] link.

  4. For the "Preferred Garment" and "Print Method" field, click the properties icon and change the Display Type to "Pull-down" and Submit.

  5. Create several instances of the Garment object:
    i.e.,
    Name: 100% Cotton T-Shirt, Id: 100c_t1, Print Method: Screen
    Name: 100% Cotton T-Shirt, Id: 100c_t2, Print Method: Direct To Garment
    Name: 100% Cotton T-Shirt, Id: 100c_t3, Print Method: Heat Transfer
    Name: 100% Cotton T-Shirt, Id: 100c_t4, Print Method: Dye Sublimation
    Name: Poly Mesh Jersey, Id: pmj1, Print Method: Screen
    Name: Poly Mesh Jersey, Id: pmj2, Print Method: Heat Transfer
    Name: 100% Cotton Towel, Id: 100c_towel1, Print Method: Screen
    Name: 100% Cotton Towel, Id: 100c_towel2, Print Method: Direct To Garment

  6. Now create an instance of the Print Job, select the garment you want to use and see that your printing options are now limited to what works with that garment type.
Answer:

Below are the steps to setup a parameterized lookup configuration. (Scenario: Bob's Shirt Shop would like to use PPM to keep track of compatible print methods for printing names, logos and numbers on various garments. (i.e., "screen printing" or "direct to garment" work well on a towel, but a heat transfer would create a mess))

  1. Create a master object called "Garment" with an id of "garment" and Save.

  2. Create a new string attribute called "Print Method" with an id of "printmethod".

  3. Add the attribute to the properties view for the "Garment" object via [Layout: Create].

  4. Create a new lookup called "Garments" with an id of "garments". The lookup should use a dynamic query.

  • Type in the query text:

    SELECT @SELECT:garment.name:GarmentName@
    FROM ODF_CA_GARMENT garment
    WHERE @FILTER@
    GROUP BY garment.name

    Note: In this example, the hidden key is the same as the name, since our garment to print method will have multiple mappings (hence the need for "group by")
  • Save and Continue.
  • Specify "garmentname" as the display attribute on the Lookup Properties:Parent Window pagSave and exit.

     5. Create a new lookup called "Print Methods" with an id of "printmethods". The lookup should use a dynamic query.

  • Type in the query text:

     SELECT @SELECT:garment.printmethod:printmethod@ FROM ODF_CA_GARMENT garment WHERE @FILTER@ AND     (@WHERE:PARAM:USER_DEF:STRING:GARMENT@ IS NULL OR @WHERE:PARAM:USER_DEF:STRING:GARMENT@ = garment.name)

  • Save and Continue.
  • Specify "printmethod" as the display attribute on the Lookup Properties:Parent Window page.
  • Save and exit.

     6. Create a new master object called "Print Job" with an id of "printjob" and Save.

     7. Create a new attribute called "Preferred Garment" with an id of "garment".

  • Choose Data Type of Lookup. 
  • Choose Lookup of "Garments". 
  • Save.

     8. Create a new attribute called "Print Method", with an id of "printmethod"

  • Choose Data Type of Lookup.
  • Choose Lookup of "Print Methods".
  • Check value required.
  • Save.
  • Under Lookup Parameter Mappings, specify "garment" for the Lookup Parameter "garment".
  • Save again.

     9.  Navigate to the Object Definition: Views page for the "Print Job" object.

  • Add the "Preferred Garment" and "Print Method" to the properties view of the "Print Job" object.

  • Navigate back to the properties view row, click the [Fields] link.

  • For the "Preferred Garment" and "Print Method" field, click the properties icon and change the Display Type to "Pull-down" and Submit.

  • Create several instances of the Garment object:
    i.e.,
    Name: 100% Cotton T-Shirt, Id: 100c_t1, Print Method: Screen
    Name: 100% Cotton T-Shirt, Id: 100c_t2, Print Method: Direct To Garment
    Name: 100% Cotton T-Shirt, Id: 100c_t3, Print Method: Heat Transfer
    Name: 100% Cotton T-Shirt, Id: 100c_t4, Print Method: Dye Sublimation
    Name: Poly Mesh Jersey, Id: pmj1, Print Method: Screen
    Name: Poly Mesh Jersey, Id: pmj2, Print Method: Heat Transfer
    Name: 100% Cotton Towel, Id: 100c_towel1, Print Method: Screen
    Name: 100% Cotton Towel, Id: 100c_towel2, Print Method: Direct To Garment

     10. Now create an instance of the Print Job, select the garment you want to use and see that your printing options are now limited to what works with that garment type.