Method Community

 

trying to understand "Only Distinct Values" - need examples

Last post 03-03-2016 2:24 PM by Method_Adam. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 01-28-2016 1:21 PM

    trying to understand "Only Distinct Values" - need examples

    Screen shot

    This is a screen shot of the Start Loop thru a Table action.   There is an optional value of "Only Distinct Values".   I think I know what

    this might do, but don't seem to be able to get it to work for me.   Can you provide a couple of examples I can look at and maybe an

    explanation of how this can be used.  

    Stuart Katz
    Noggin Builders
    Let your children come explore the wonders!
  • 02-01-2016 12:32 PM In reply to

    Re: trying to understand "Only Distinct Values" - need examples

    Hi Stewart,

    "Only distinct values" does what you'd probably expect and only loop through the distinct values in the table/grid you are looping through.

    For instance, if you're looping through your Estimate table and want to count the number of customers you've created estimates for, you can loop through the esimtate table, only showing distinct values for the field "Customer". By doing this, if you had a customer with several estimates, the loop would only loop through the first instance of the customer and skip any other records it might otherwise loop through. Here's a screenshot of how I set this up:

    In my example, the other actions in the action set are basically appending the customer name to an action result, just simply to show that the customer name is only being shown once. This worked for me. I had several customers in my test acccount with multiple estimates and each customer name only showed once.

    Hope this helps. Let me know if you have any other questions.

    Adam

    Adam Lyons
    Manager of Support
    Method Integration
    a.lyons@method.me
  • 02-01-2016 4:21 PM In reply to

    Re: trying to understand "Only Distinct Values" - need examples

    Adam

    Thanks.   I was hoping this was the casae.   Only one small problem.   If instead of appending the item onto an action ressult like you did if you try to use the record to retrieved information from the record and create a new record in a new table you will fine that only the distinct field is able to be found even though when you do the insert record action it will actually show all the fields from the original table as being available.   Strange.   If you would like me to show you and example and we can arrange some time to do it.   Please remember I am 5 hours behind you so any time after 12:00 noon is okay.   808-669-9149

    Stuart

    Stuart Katz
    Noggin Builders
    Let your children come explore the wonders!
  • 02-10-2016 4:14 PM In reply to

    Re: trying to understand "Only Distinct Values" - need examples

    Hi Adam.

    Never heard back from you on this?

    Stuart

    Stuart Katz
    Noggin Builders
    Let your children come explore the wonders!
  • 02-17-2016 8:57 PM In reply to

    Re: trying to understand "Only Distinct Values" - need examples

    Adam,

    Here is some additional information

    I am trying to loop thru a file using the distinct value and then update the record it finds with a unique flag.   That way I can use those flagged records to create a grid.

    As I said the problem is that it does not seem to recognize any information other than the distinct value.

    Here are some screen shots to show you what I mean.

    Please let me know what is happening here.  I you would like to call please feel free to reach out to me anytime after 1:00pm east coast time.

    Stuart Katz

    808-669-9149

     

    Stuart Katz
    Noggin Builders
    Let your children come explore the wonders!
  • 02-18-2016 9:30 AM In reply to

    Re: trying to understand "Only Distinct Values" - need examples

    Hey Stuart, 

    I'll jump in here. 

    Just to catch up:

    You are trying to to Loop Through a Grid and only for the rows with distinct values you are flagging them (seperate column on the Grid I assume?).

    Then creating another Grid to list only the above Grids rows that you flagged. 

    Does that sound correct?

    -- Mortaza

    Morty Barighzaai
    Customer Success Manager
    Method:CRM
  • 02-18-2016 11:04 AM In reply to

    Re: trying to understand "Only Distinct Values" - need examples

    looping thru a table By distinct value.  Don't think you can loop thru a grid by distinct value. 

    Stuart Katz
    Noggin Builders
    Let your children come explore the wonders!
  • 03-03-2016 10:20 AM In reply to

    Re: trying to understand "Only Distinct Values" - need examples

    HI Stuart,

    I'll jump back in here. There's something I falied to make you aware of that is likely causing an issue for you. When looping through a table with distinct values, you cannot use the loop's action result to get the recordID of the row. When normally looping through the table you can do this.

    So, since as I understand it, you are trying to take the vlaues in the row of the loop to insert into another table, you'll need to add a "Assign Value to Action Result" as the first action inside the loop. You can use this action to assign the recordID of the row and use that for the other actions in your action set. It would be as below:

    1. Loop through table action for distict values
    2. Insidet the loop, add an assign value to action result (see screenshot)
    3. Assign the action result to be the recordID value of the row.
    4. Add your other actions that are inside the loop.

    If I'm offbase with this, please let me know.

    - Adam

    Adam Lyons
    Manager of Support
    Method Integration
    a.lyons@method.me
  • 03-03-2016 2:24 PM In reply to

    Re: trying to understand "Only Distinct Values" - need examples

    Hi Stuart,

    I got your email of the screenshots. The big issue I see is that your loop through table action is not setup correctly, which is likely why you're getting odd results. If you want to loop through the entire table, you have to setup the action like this:

    The Where fields are required. So to loop through the entire table, set it to loop through where recordID is equal to >0. 

    Adam

    Adam Lyons
    Manager of Support
    Method Integration
    a.lyons@method.me
Page 1 of 1 (9 items)