Results 1 to 11 of 11

Thread: Repeater/Dataset Documentation (API, Item, TargetItem, Variables)

  1. #1
    Apprentice Level
    Join Date
    Sep 2013
    Location
    Sydney
    Posts
    31
    Thanks
    10
    Thanked 5 Times in 3 Posts


    Repeater/Dataset Documentation (API, Item, TargetItem, Variables)

    Hi all,

    I came across this list of Repeater/Dataset variables (or functions?) when editing a formula.


    Could someone explain what these are and how to use them, or point me to a resource that does that?

    Cheers!

  2. The Following 3 Users Say Thank You to Ling For This Useful Post:

    IgorX (03-09-2014), MXMLLN (11-05-2015), pablocruz23 (11-30-2015)

  3. #2
    Sifu
    Join Date
    Sep 2008
    Location
    Minnesota
    Posts
    1,177
    Thanks
    83
    Thanked 382 Times in 269 Posts


    My LinkedIn
    I'm not sure what the difference is between itemCount and dataCount. Both seem to reflect the number of items in the repeater.

    The Repeater refers the repeater widget itself.

    The others are useful if you have a paginated view:

    pageCount is the total number of pages (total items / items per page)
    pageIndex is the current page
    visibleItemCount is how many items you can see at the moment

    This file may help give you a feel for it.

    Jeff
    Attached Files Attached Files
    Jeff Harrison
    Axure Trainer at Evantage Consulting

  4. The Following 2 Users Say Thank You to Jeff Harrison For This Useful Post:

    AutumnBeth (08-30-2014), Ling (01-23-2014)

  5. #3
    Axure Developer
    Join Date
    Feb 2012
    Location
    San Diego, CA
    Posts
    2,258
    Thanks
    116
    Thanked 671 Times in 486 Posts


    Quote Originally Posted by Jeff Harrison View Post
    I'm not sure what the difference is between itemCount and dataCount. Both seem to reflect the number of items in the repeater.

    The Repeater refers the repeater widget itself.

    The others are useful if you have a paginated view:

    pageCount is the total number of pages (total items / items per page)
    pageIndex is the current page
    visibleItemCount is how many items you can see at the moment

    This file may help give you a feel for it.

    Jeff

    Just a small clarification:

    visibleItemCount: Items currently shown (in current Filter and on current page if multiple pages)
    itemCount: Items in the current Filter
    dataCount: All Items in the Dataset including Items not shown or currently filtered out
    Last edited by Ian Gardner; 05-20-2015 at 12:33 PM.

  6. The Following 2 Users Say Thank You to Ian Gardner For This Useful Post:

    Jeff Harrison (01-22-2014), Ling (01-23-2014)

  7. #4
    Sifu
    Join Date
    Dec 2011
    Location
    Chicago, IL
    Posts
    843
    Thanks
    143
    Thanked 228 Times in 159 Posts


    My Twitter My LinkedIn

    Details about Repeater "API"?

    Hi All,

    I decided to dive a little deeper into the new repeater "API" options. Through trial and error I was able to identify what some of the items do (in blue), but I have questions on others (in red and orange). I was hoping that someone in the community has answers before I get them through continuous testing

    I am particulary interested in the "is..." test methods and how they are executed. Also, I noticed that some of the options ("is...", "item...") are only avaiable for certain repeater actions and not others. Have you identified what controls the availability of said options?

    Thanks for any info you can share on this!

    light_forger

    PS: .x/.y, .width/.height and .bottom/.top seem to be working fine on repeaters!
    Attached Images Attached Images  
    Svetlin Denkov
    User Experience Professional
    Twitter: @svetlindenkov LinkedIn: http://linkd.in/JbZDre
    Meetup: http://bit.ly/1qITjzK

  8. The Following User Says Thank You to light_forger For This Useful Post:

    Ling (01-23-2014)

  9. #5
    Axure Developer
    Join Date
    Feb 2012
    Location
    San Diego, CA
    Posts
    2,258
    Thanks
    116
    Thanked 671 Times in 486 Posts


    I am going to merge this with a similar thread, you should see your questions about "repeater" and its properties answered above.




    Item Properties
    Your image includes Item and its properties as well. This means you are in a Repeater or an Action that acts on a Repeater. Item is the current Item you are working with. So if you do Set Text of Shape to [[Item.Name]] in OnItemLoad of the Repeater each Shape in turn will be set to its corresponding rows "Name" column.


    The properties after Item are executed on an item.
    index: Gives the corresponding index of the Item in the Repeater (similar to the row, but Sorts, Filters and Pagination matter)
    is_: Returns "true" or "false" representing whether the Item is first, marked, visible, etc...
    repeater: returns the parent Repeater of this item which can then in turn use the Repeater properties that follow it.



    Repeater Properties
    There are 2 ways to access Repeater properties.

    1. From inside a Repeater do [[Item.Repeater.visibleItemCount]]

    2. From outside a Repeater or referencing a different Repeater. In the expression (fx) editor, set a Local Variable (myRepeater) to a Repeater Widget. Then use [[myRepeater.visibleItemCount]].



    Item vs TargetItem
    This was posted elsewhere, but probably fits better here. The distinction between Item and TargetItem.

    Item: Used to reference the current Item you are working with. Only available inside a Repeater. This is the most common.

    Example: Set Text of Button Shape to [[item.Column1]] of the Data Set.



    TargetItem: Used to reference an item that is Marked or in another Repeater.

    Example (using Marked Rows and Interaction - Repeaters -> Datasets -> Update Items):
    (on a click copy my data to another Marked Item) use Item
    (on a click copy another Marked Item's data from one Column to another) - use TargetItem


    You can also use TargetItem to reference Items in another Repeater or from outside a Repeater.
    Last edited by victor; 07-22-2014 at 06:39 PM.

  10. The Following 5 Users Say Thank You to Ian Gardner For This Useful Post:

    light_forger (01-23-2014), Ling (01-23-2014), LisaGDC (10-04-2016), maitebaran (01-30-2014), Miles (02-01-2017)

  11. #6
    Sifu
    Join Date
    Dec 2011
    Location
    Chicago, IL
    Posts
    843
    Thanks
    143
    Thanked 228 Times in 159 Posts


    My Twitter My LinkedIn
    Thanks Ian! I don't know how this thread slipped through. I was just reviewing the Repeater forum today
    Svetlin Denkov
    User Experience Professional
    Twitter: @svetlindenkov LinkedIn: http://linkd.in/JbZDre
    Meetup: http://bit.ly/1qITjzK

  12. #7
    Apprentice Level
    Join Date
    Sep 2013
    Location
    Sydney
    Posts
    31
    Thanks
    10
    Thanked 5 Times in 3 Posts


    Jeff,
    Thanks very much for the example. It's very clear.

    And through the example, I've also found a solution to something I was puzzling over - how to refer to different repeaters in the same page in the formulas.

  13. #8
    Newbie Level
    Join Date
    Mar 2014
    Location
    France
    Posts
    1
    Thanks
    1
    Thanked 0 Times in 0 Posts


    My Twitter
    Hello Ian,

    can you please be more precise about "2. From outside a Repeater or referencing a different Repeater. In the expression (fx) editor, set a Local Variable (myRepeater) to a Repeater Widget. Then use [[myRepeater.visibleItemCount]]."

    I'm trying to show the number of items in a repeater in the actual page and it seems that your solution fits to my need.

    Thanks for your answer.

  14. #9
    Newbie Level
    Join Date
    Jul 2015
    Location
    USA, Earth
    Posts
    9
    Thanks
    1
    Thanked 2 Times in 2 Posts


    Is there any way to directly access, from outside the Repeater, the marked rows as well as find the index of a row based on a string using a Local Variable assigned to the Repeater?

  15. #10
    Newbie Level
    Join Date
    Jul 2015
    Location
    USA, Earth
    Posts
    9
    Thanks
    1
    Thanked 2 Times in 2 Posts


    I reached out to Axure support and found out that we do, in fact, need to trigger an event to refresh a Repeater to get data out of it so we can't just use a Local Variable, it seems. The way I did what I needed was to trigger a Remove All Filters event on the Repeater, then put logic in the OnItemLoad event within the Repeater to get any necessary information.

    It's not ideal, in my mind, especially when the DOM of browsers allows such easy access to objects. But that's how it works! It's not the worst. It is what it is.

  16. The Following User Says Thank You to caRpjUx For This Useful Post:

    MXMLLN (11-21-2015)

  17. #11
    Axure master
    Join Date
    Mar 2011
    Location
    Berlin
    Posts
    26
    Thanks
    5
    Thanked 11 Times in 7 Posts


    My LinkedIn
    For those who'd like to dig a bit deeper into this, I can also recommend the advanced Axure training package that I've been working on, where Javascript functions, expressions and properties related to repeaters are discussed in great detail.

    https://www.humaneinterface.net/ux-training-axure

    I've spent a large amount of time doing lots of research and testing on these topics and did my best to explain them thoroughly but in plain language, I hope my work can be useful to others as well.

Similar Threads

  1. Change Repeater Item Value without redraw Repeater
    By Gregor in forum Repeater Widget
    Replies: 8
    Last Post: 06-22-2015, 10:32 AM
  2. Selecting the first item in the repeater after filter
    By Custa in forum Repeater Widget
    Replies: 2
    Last Post: 01-23-2015, 06:25 AM
  3. How do I link out from a repeater item?
    By Chris Callaghan in forum Repeater Widget
    Replies: 2
    Last Post: 04-04-2014, 02:27 AM
  4. Track last item clicked in repeater
    By btaylor328 in forum Repeater Widget
    Replies: 3
    Last Post: 03-13-2014, 11:16 AM
  5. Number of item per row in repeater is max 5
    By melibrion in forum 7.0 Technical Troubleshooting
    Replies: 0
    Last Post: 07-08-2013, 07:15 AM

Search Engine Friendly URLs by vBSEO 3.6.0 PL2