Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
+1
person also asked this
people also asked this
Replies
11 replies
Subscribers
8 subscribers
Views
4339 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Hi, I would like to ask the community three questions. Prior to asking the quest
sikhivahans
over 8 years ago
Hi, I would like to ask the community three questions. Prior to asking the questions, I would like to give some context and please do let me know if you have questions here:
I am trying to construct a reusable editable grid and trying to make the 'rows' attribute as much generic as possible. In this attempt I have made the rule reference as input, which means that anyone who uses this reusable grid would be able to use their own rule which renders grid row layout.
So simply speaking, the reusable grid rule looks like below:
editableGrid
-----------------
a!gridLayout(
/*Other attributes of gridLayout removed to make it look simple*/
rows: a!applyComponents(
ri!nameOfItemsRowEachRule(
ri!items,
_,
ri!itemsToken
),
if(or(isnull(ri!items), count(ri!items) < 1), {}, 1+enumerate(count(ri!items))),
ri!itemsToken
)
/* where ri!name...
OriginalPostID-169115
OriginalPostID-169115
Discussion posts and replies are publicly visible
Parents
0
sikhivahans
over 8 years ago
... array:ri!nameOfItemsRowEachRule(
items:ri!items,
index:_,
itemsToken:ri!itemsToken
),
array: if(or(isnull(ri!items), count(ri!items) < 1), {}, 1+enumerate(count(ri!items))),
arrayVariable: ri!itemsToken
)
But I am not able to do as above as I am experiencing an error where Appian says that passing the arguments by keywords isn't available. So I am doing as follows by passing the arguments without making use of keywords:
rows: a!applyComponents(
ri!nameOfItemsRowEachRule(
ri!items,
_,
ri!itemsToken
),
if(or(isnull(ri!items), count(ri!items) < 1), {}, 1+enumerate(count(ri!items))),
ri!itemsToken
)
2. I am unable to name the rule input as I wish, which I am making use of for receiving the reference of a rule (nameOfItemsRowEachRule).
Initially I did as follows:
a!gridLayout(
/*Other attributes of gridLayout removed*/
rows: a!applyComponents(
r...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
sikhivahans
over 8 years ago
... array:ri!nameOfItemsRowEachRule(
items:ri!items,
index:_,
itemsToken:ri!itemsToken
),
array: if(or(isnull(ri!items), count(ri!items) < 1), {}, 1+enumerate(count(ri!items))),
arrayVariable: ri!itemsToken
)
But I am not able to do as above as I am experiencing an error where Appian says that passing the arguments by keywords isn't available. So I am doing as follows by passing the arguments without making use of keywords:
rows: a!applyComponents(
ri!nameOfItemsRowEachRule(
ri!items,
_,
ri!itemsToken
),
if(or(isnull(ri!items), count(ri!items) < 1), {}, 1+enumerate(count(ri!items))),
ri!itemsToken
)
2. I am unable to name the rule input as I wish, which I am making use of for receiving the reference of a rule (nameOfItemsRowEachRule).
Initially I did as follows:
a!gridLayout(
/*Other attributes of gridLayout removed*/
rows: a!applyComponents(
r...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data