Difference between revisions of "API Component.Property.GetListIndex"
From Flowcode Help
Jump to navigationJump to search (XML import) |
|||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
− | Gets a single lists index value from a property by line number | + | |- |
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetListIndex''' | ||
+ | |- | ||
+ | | colspan="2" | Gets a single lists index value from a property by line number | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE | ||
+ | | width="90%" | Handle | ||
+ | |- | ||
+ | | colspan="2" | The component handle to get the property of | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING | ||
+ | | width="90%" | Property | ||
+ | |- | ||
+ | | colspan="2" | The textual name of the property | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG | ||
+ | | width="90%" | LineIx | ||
+ | |- | ||
+ | | colspan="2" | The lists line (first is zero) to read the index of | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | + | ==Detailed description== |
− | + | Given a ''Property'' which is a list type, this gets the index (3-character) part of the line corresponding to ''LineIx'', with zero being the first line. This index can then be used in [[API Component.Property.GetListItem|GetListItem]] and related calls. | |
− | |||
− | |||
− | |||
− | [[ | + | The lines of the property are stored in its filter - see [[API Component.Property.GetFilter|GetFilter]]. |
− | |||
− | |||
− | |||
− | + | No checks are performed to establish the property is of the correct type. | |
− | |||
− | |||
Line 33: | Line 42: | ||
* Declare a variable 'result' of type STRING | * Declare a variable 'result' of type STRING | ||
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Component.Property.GetListIndex(handle, "property", lineix)</pre> | * Add to a calculation icon: <pre class="brush:[cpp]">result = ::Component.Property.GetListIndex(handle, "property", lineix)</pre> | ||
− | |||
− |
Latest revision as of 11:54, 16 January 2023
Detailed description
Given a Property which is a list type, this gets the index (3-character) part of the line corresponding to LineIx, with zero being the first line. This index can then be used in GetListItem and related calls.
The lines of the property are stored in its filter - see GetFilter.
No checks are performed to establish the property is of the correct type.
Examples
Calling in a calculation
- Declare a variable 'result' of type STRING
- Add to a calculation icon:
result = ::Component.Property.GetListIndex(handle, "property", lineix)