locked
Custom list form New item form.aspx row count is always 1 RRS feed

  • Question

  • Hi,

      I created a custom list form for new item form.aspx.I want to check a condition based on the number of rows in this list,But the count is always one.Can any one help me in getting the total row count of the list.

    Thanks,

    Sreemouni

    Monday, May 2, 2011 2:57 PM

Answers

  • Hi,

    Thanks to share your post.

    For the issue, here is some example code:

    ·         Foreach(int i, listview.items[“the list item name”].subitems)

    {

       If( listview.items[“the listitem name”].subitems.string[i]=1);

       Listview.items[“number correct”].subitems.string[i]++;

    }

    Hope this could give you a hand!

    Leo

    • Marked as answer by Emir Liu Monday, May 9, 2011 9:47 AM
    Thursday, May 5, 2011 7:00 AM

All replies

  • Hello,

    To acomplish this you will need to create a for-each workflow loop - I have written a blog that can step you through the process:

    http://sharepointgypsy.blogspot.com/2011/01/sharepoint-designer-workflows-2.html

    Thanks!

    Tom


    Tom Molskow - SharePoint Architect - Microsoft Community Contributor 2011 Award - Linked-In - SharePoint Gypsy
    Tuesday, May 3, 2011 11:38 AM
  • Hi,

    Thanks to share your post.

    For the issue, here is some example code:

    ·         Foreach(int i, listview.items[“the list item name”].subitems)

    {

       If( listview.items[“the listitem name”].subitems.string[i]=1);

       Listview.items[“number correct”].subitems.string[i]++;

    }

    Hope this could give you a hand!

    Leo

    • Marked as answer by Emir Liu Monday, May 9, 2011 9:47 AM
    Thursday, May 5, 2011 7:00 AM