Method Community

 

Ordered items in grid

Last post 10-03-2013 4:47 PM by Method_Jason. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-24-2013 11:06 AM

    Ordered items in grid

    I have the need to order items differently in a grid.

    I created a field, displalLIne for the table the grid uses. I have the sorting set to use the displayLine to reorder the grid if I change the numbers in the display line, that part works great.

    My problem is that I am not able to add successive numbers to the rows when I loop through them. I am able to place a static value, but I do not see any way to have a counter that gets incremented while I loop through and update the display line field.

    How would I maintain a counter while I am looping through fields in a table?

  • 09-24-2013 3:19 PM In reply to

    Re: Ordered items in grid

    Hi grdmunoz,

    You could use a Basic Math Calculation action within your loop that will update your DisplayLine field and add one to each selected recordThere are a bunch of options depending on what you're trying to do, but below I set up an action set that updates my custom PlusOneNumber field. It incrementally adds one to each new record selected in the loop, starting from the maximum number in the table. 

    I'm not sure if this is exactly what you mean by a 'counter'. If not, feel free to elaborate a bit more and I'll try to find a better way. 

    Jason

    Need more help? Ask us about Method consulting services

    Jason Masina
    Community Support Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.masina@methodintegration.com
  • 10-02-2013 1:06 PM In reply to

    Re: Ordered items in grid

    That seems to get me pretty close, I understand what you say about using max to determine the current max in the row.

    I have included a section of my grid for clarification.


    I need the displayLine fields to be sequentially numbered from top to bottom. (1,2,3,4,etc)


    right now the problem I am having ins correctly configuring the where clause in update field in table action. If you can shed some light there I would greatly appreciate it

  • 10-03-2013 4:47 PM In reply to

    Re: Ordered items in grid

    grdmunoz,

    In the scenario in my previous post, I set my where clause as: where the RecordID is equal to the Value From RowRecordID. Since I wanted to update every record selected in my loop, this was an appropriate choice. 

    Jason

    Need more help? Ask us about Method consulting services

    Jason Masina
    Community Support Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.masina@methodintegration.com
Page 1 of 1 (4 items)