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
Replies
7 replies
Subscribers
7 subscribers
Views
3371 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Hi, I'm trying applyComponents function on rich text items (such as a!richTe
erick258
over 8 years ago
Hi, I'm trying applyComponents function on rich text items (such as a!richTextItem, a!richTextNumberedList, etc) by applying it on the 'value' of a!richTextField but it doesn't return anything at all. Does applyComponents doesn't work on rich text items?
Below is the snippet of my codes.
OriginalPostID-218581
OriginalPostID-218581
Discussion posts and replies are publicly visible
Parents
0
Sidhant Behura
over 8 years ago
If you change the expression rule "loopingRichTextItem" in to an interface may be you will get more clarity from the error it throws which is as follows:
"Interface Definition: Expression evaluation error: An array of components may only contain components. Received FormattedText at index 1."
So, to my understanding appian not not treating a!richTextItem as an independent component. It also states the same in the forum help i.e. "Displays styled text within a rich text(i.e a!richTextDisplayField) component."
So you have to use a!richTextItem within a!richTextDisplayField if you want to use them in loops as a component.
So the solution to this scenario is use a!richTextDisplayField inside the "loopingRichTextItem" rule and iterate it from the main interface. Please refer the below code snippet.
loopingRichTextItem():
a!richTextDisplayField(
label: "Test",
value:
{
a!richTextItem(
text: "Test " & ri!header,
style: "NORMAL"
),
a!richTextNumberedList(
items:{
ri!detail
}
)
}
)
Let me know if the information is helpful.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Sidhant Behura
over 8 years ago
If you change the expression rule "loopingRichTextItem" in to an interface may be you will get more clarity from the error it throws which is as follows:
"Interface Definition: Expression evaluation error: An array of components may only contain components. Received FormattedText at index 1."
So, to my understanding appian not not treating a!richTextItem as an independent component. It also states the same in the forum help i.e. "Displays styled text within a rich text(i.e a!richTextDisplayField) component."
So you have to use a!richTextItem within a!richTextDisplayField if you want to use them in loops as a component.
So the solution to this scenario is use a!richTextDisplayField inside the "loopingRichTextItem" rule and iterate it from the main interface. Please refer the below code snippet.
loopingRichTextItem():
a!richTextDisplayField(
label: "Test",
value:
{
a!richTextItem(
text: "Test " & ri!header,
style: "NORMAL"
),
a!richTextNumberedList(
items:{
ri!detail
}
)
}
)
Let me know if the information is helpful.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data