Unique line items in a table

BillBill 💎
edited June 25, 2020 in Questions
I have table with 50 city names with some duplicate city names.  I only want one to show a city once.  how do I do this?
https://drive.google.com/file/d/0B409lhd9sYDcUVdzQjN5alQ1RlE/view

Comments

  • Pat VachonPat Vachon 💎💎💎
    edited June 25, 2020
    You could create an aggregate model or use javascript to abandonRow duplicate city names.
  • BillBill 💎
    edited May 12, 2020
    image
    I did this.  What else do I need to do?
  • Matt SonesMatt Sones 💎💎💎
    edited February 10, 2017
    Add all the fields that you want to display as aggregations, and then create a table on your model. You have to drag and drop the fields from the model field list into the model.
  • Rob HatchRob Hatch 💎💎💎
    edited September 1, 2016
    I looks like your table is still bound to the basic model.  You need to change the Model that drives the table to the aggregate one you built.  

    But here is where things get tricky.   Every field you want to show in the table will have to be in the grouping section.  And there is no way to include formula fields in grouping statements (This is a core limitation to Salesforce SOQL).   

    Actually Matt's answer is a little misleading.   If you put your fields in the "Aggregation" section of your model - you won't be able to show field values,  just do calculations like COUNT.   Helpful in some cases, but not in yours. 

    If this does not work the solutions are going to be much harder - either Apex code to prevent the duplicate entries,  or Javascript code to analyze the model presented to the client and abandon the duplicate rows.  Both of these are outside the bounds of what we can provide in basic support.   
  • Pat VachonPat Vachon 💎💎💎
    edited June 25, 2020
    You could use agg model as a condition to a basic model. In the agg model, set your conditions as desired and group by City and Id.

    In your basic model, set the condition on Id to be "in" the agg model id values.
  • Matt SonesMatt Sones 💎💎💎
    edited February 10, 2017
    Great solution there from Pat.

    Rob, I'm pretty sure I've used MAX 'aggregations' for text fields with success. But groupings does seem to make more sense.
  • BillBill 💎
    edited June 25, 2020
    Hello Pat,

    Thanks, that seems like it should work.  I believe I have followed your instructions but not yet working.  Here is how i have it set up:

    https://drive.google.com/file/d/0B409lhd9sYDcWS1DaEhRc281ZFE/view?pli=1

    Bill

  • Pat VachonPat Vachon 💎💎💎
    edited January 5, 2016
    Should work. Do you have skype? pat.vachon.77
  • Rob HatchRob Hatch 💎💎💎
    edited September 1, 2016
    Don't think this will work.  If 2 rows in basic model match the row in the aggregate model - you still have duplicate rows in your table. 
  • BillBill 💎
    edited November 26, 2016
    yes. I will c
  • BillBill 💎
    edited November 26, 2016
    Thanks Pat that worked great.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!