Method Community

 

Get List from Grid

Last post 02-25-2014 1:41 PM by Anonymous. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 02-21-2014 5:39 PM

    Get List from Grid

    Hello,

    I'm trying to retrieve multiple items from a Grid on my screen and save them as an action item so I can list them in the body of an email.  Here's the scenario, I have a Parts Order Form Screen.  On that screen is Cust. Name and important info plus an attached GRID from a separate parts table.  Everything works great.  You fill in the info for Cust, etc. fill in the parts needed on the Parts Grid/Table, save it, and it emails CustomerService that a part is needed and there is an attached PDF to see the screen so they know what part.  - Works Great...

    What I'm trying to get to is to use loop/grid; character function to retrieve the part# and partdescription; assign it to a action result; use the action result for the body of the email.

    I have this working so far but it only saves the last part in the grid to the action result.  I need it to remember the first part#/description; add the second part#/description; etc. to build a list that I can use in the body of the email.

    I've tried assign value to action result (one for part # and one for part desc.) and used char func to join them within the grid/loop function but still just get 1 result.  I also tried just using char func. alone to grab the value from row but I get the same result only the last part of the list.

    I saw a forum post that referrenced looking at Print > Print selected from the INVOICE screen but I can find no such button on any of the *invoice* method screens.

    Thanks in advance for you help.

    WaveTec

    Thank you,
    Wavetec
  • 02-21-2014 11:47 PM In reply to

    • fran
    • Top 25 Contributor
    • Joined on 02-08-2009
    • Mountain View
    • Posts 453

    Re: Get List from Grid

    hi WaveTec,

    Sounds like a great process.  If I get you  - you have one actionresult which is combo part#/description.... With that  result - set up a new actionresult which joins this to build your list.   try using the char function --join with line break..

    Then when you put into email body...one part#/description will be on a line..  just an idea....

    fran

    Fran Reed
    FreedUp Solutions
    Intuit Solution Provider
    Advanced Certified Quickbooks ProAdvisor
    Advanced Method Solution Provider
  • 02-24-2014 11:28 AM In reply to

    Re: Get List from Grid

    Thanks for the reply Fran,

    I'm able to do what you are saying, that's not my issue.  What I need is for it to loop thru the Grid and capture line1, line2, line3, etc. and keep that in an action result so I can put it into an email body. Currently what I get is just line3 or the last line it reads whatever line that is.

    Here's what I need:

    1234     widget

    5678     wingding

    9012     nut

    Thanks tho.

    I recently tried using multiple action results and using the character funtion to "select next line item" but either I'm doing it wrong or that's not what it's meant for because I didn't get any results from that.

    WaveTec

    Thank you,
    Wavetec
  • 02-24-2014 2:18 PM In reply to

    Re: Get List from Grid

    Hi WaveTec, 

    Fran, thanks for your input and suggestions, I would have started with what you suggested also.

    WaveTec, just to be clear, are you saying that you are attempting to do this with more than one line item at one time, or just catch more than one field value from one line item?  I recreated an example of what I believe you are attempting to do in your own account (if it is just for one line item/record at a time).  Notice in my screenshot, I have a grid based on the Customer table, and I am showing the Company, Contact, Phone and Address1 fields for each Customer record.  Also in the grid, I have added a checkbox to the left-hand side to make sure I can select different rows.  Then, in my bottom section I have two fields, "AR_Company", and "AR_Contact", both are there only to show my Action Results, so I can make sure I am grabbing the correct values.  Then you will see a button in this section, labelled "LoopGrid & Email".  With this button, I am first looping through the grid to look for a checked row, if there is a checked row, I have an "Assign a Value to Action Result" to grab the Company Field value from the grid, then the Contact field value from the grid.  I am then using a character function to join my two fields together with a comma, this is also demonstrated inthe pop-up message in my screenshot.  I went get into any more details at this point, please first confirm this is similar to your setup, if not, let me know the difference.  My example does work, so if this is similar, I can show you some of my actions I used to get me here.



    -Ben

  • 02-24-2014 2:42 PM In reply to

    Re: Get List from Grid

    Hey Ben,

    I don't have checkboxes but I suppose I can add them and default them to checked but just to be quick about it what happens when you check multiple lines.  I'm trying to get them a list of all the parts ordered on the screen

     .

    I don't know if you can see the print screen I tried to copy.  I don't know how to upload an image either.

    :)

    WaveTec - Greg

    Thank you,
    Wavetec
  • 02-24-2014 3:16 PM In reply to

    Re: Get List from Grid

    Greg - Actually, I don't believe this would work for multiple lines (I still have to try it out), this is why I was asking to make sure before writing out all my steps.  Are you saying you are looking for something similar to my setup, but with more than one record from the grid (Record meaning lines/rows)?  

    Unfortunately, I am not able to see the image you uploaded.  Generally we use an online image bank to upload our screenshots, then we provide a link to it through the picture icon above.  If you want to give this a go, you can try a site like imgur.com.  If you have issues attaching a link to the picture image here, you can simply just paste the URL to your image, and I can click it to see your screenshot.

    -Ben


  • 02-25-2014 10:58 AM In reply to

    Re: Get List from Grid

    Hi Greg, 

    I believe I have figured out a solution to what you are attempting, in regards to adding more than one line item at a time.  The trick here is to first create a blank Action Result outside your Grid Loop, then use the Character Function inside the loop in order to grab all the info you need, just make sure to assign your Character Function Action Results to the SAME name as the Action Result created outside the loop.  I have attached a screenshot below showing my various actions for my "Loop & Email" Button.

    Here is a screenshot of my Character Function for Action #6, the rest should be similar based off this one.

    Again, the key in the screenshot from above is assigning your Character function to the original Action Result name created outside the loop, in my case I called it "AR_CompanyInfo".  My last screenshot below shows the end result in a Pop-up Message, however I do have an action that sends all the data in the Action Result to an Email.

    I hope this helps, if you need to see any of my other actions details, just let me know. Hopefully by keeping in mind my key points from above, we should get this screen working for you.

    -Ben

  • 02-25-2014 12:07 PM In reply to

    Re: Get List from Grid

    Thanks Ben, that totally worked.  I didn't use the Check Rows because on my Grid I needed All rows but other than that I was able to get my list.  I tried this originally but I didn't start the Action Result before the Grid Loop so that was definitely the key.

    Also I like the Show Message function to see if I'm collecting the correct info before I add it to the email.  Great Tip.

    Thanks again,

    WaveTec

    Thank you,
    Wavetec
  • 02-25-2014 1:41 PM In reply to

    Re: Get List from Grid

    Greg,

    Awesome news, glad you were able to get this resolved.  Also, agreed, the show message action can be very useful in checking your Action Results for most customizations.  Side note, between you and me, I have to give some credit to the head of our Consulting Team who hinted this answer to me!

    -Ben

Page 1 of 1 (9 items)