Difference between revisions of "RowIndex"
From Roll20 Wiki
Andreas J. (Talk | contribs) (Created page with "<noinclude>{{revdate}} {{main|Repeating Section}}{{NavMacroDocs}}</noinclude> Attributes in a Repeating Section can be referenced by their '''RowIndex'''. For a repeating...") |
Andreas J. (Talk | contribs) m |
||
(2 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude>{{revdate}} {{main|Repeating Section}}{{NavMacroDocs}}</noinclude> | + | <noinclude>{{revdate}} {{main|Repeating Section}}{{NavMacroDocs}} {{stub}}</noinclude> |
− | Attributes in a [[Repeating Section]] can be referenced by their '''RowIndex'''. For a repeating section named <code>items</code>, you could access the <code>itembonus</code> attribute for the second item on a character with the following syntax: | + | Attributes in a [[Repeating Section]] can be referenced by their '''RowIndex'''. Another method is to reference it by it's [[RowID]]. |
+ | |||
+ | For a repeating section named <code>items</code>, you could access the <code>itembonus</code> attribute for the second item on a character with the following syntax: | ||
<pre data-language="javascript">@{selected|repeating_items_$1_itembonus}</pre> | <pre data-language="javascript">@{selected|repeating_items_$1_itembonus}</pre> | ||
Line 6: | Line 8: | ||
* '''[https://app.roll20.net/forum/permalink/9102789/ Catering for 'missing attributes' when summing values]''' by Ziechael - shows how you can account for unknown number of stats in a repeating section, beyond just using <code>&{noerror}</code> | * '''[https://app.roll20.net/forum/permalink/9102789/ Catering for 'missing attributes' when summing values]''' by Ziechael - shows how you can account for unknown number of stats in a repeating section, beyond just using <code>&{noerror}</code> | ||
− | <noinclude> [[Category:Macros]] </noinclude> | + | <noinclude>[[Category:Macros]] |
+ | [[Category:Repeating Section]]</noinclude> |
Latest revision as of 13:48, 23 February 2022
Page Updated: 2022-02-23 |
Macro Creation
- Complete Guide to Macros & Rolls
- q Text Chat
- Dice Reference
- Order of Operations
- Macros
- Token Reference
- Character Reference
- Roll Templates
- Roll Table
Advanced
- Formatting
- HTML Replacement
- Chat Menus
- Hidden Rolls
- Advanced Macro Tips
- API Commands
- Char Sheet Creation
- External tools
Misc.
This article is a stub. |
Attributes in a Repeating Section can be referenced by their RowIndex. Another method is to reference it by it's RowID.
For a repeating section named items
, you could access the itembonus
attribute for the second item on a character with the following syntax:
@{selected|repeating_items_$1_itembonus}
Note: The RowIndex of an attribute starts at 0 (index is the offset from the top), so the first row uses $0
, the second uses $1
, the third uses $2
, etc.
- Catering for 'missing attributes' when summing values by Ziechael - shows how you can account for unknown number of stats in a repeating section, beyond just using
&{noerror}