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
4 replies
Subscribers
8 subscribers
Views
1677 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Spacing issue for Event data post using 'labelvalue' array
judym598
Certified Senior Developer
over 7 years ago
I recently updated multiple ‘Post System Event to Feed’ smart services to eliminate the deprecated functions: Tolabelvalue() & Tolabelvaluearray()
An example of the replacement function:
Before: =tolabelvalue(pv!eventDataLabel,pv!eventDataValue)
After: {label: pv!eventDataLabel, value: pv!eventDataValue}
and
Before: =tolabelvaluearray(pv!eventDataLabels_txt,pv!eventDataValues_txt,false())
After: {label: pv!eventDataLabels_txt, value: pv!eventDataValues_txt, false()}
Everything is working as it should now, except the spacing is off (See attached). Is there something I can add to the value I used to get the arrays to align?
OriginalPostID-254298
LabelValue Issue.docx
Discussion posts and replies are publicly visible
0
Carlos Santander
A Score Level 2
over 7 years ago
I can't find documentation on tolabelvaluearray() even going back a few Appian versions, but this might help.
I think you're just not initializing the LabelValue dictionary correctly. Assuming pv!eventDataLabels_txt and pv!eventDataValues_txt are lists, you should apply over a rule that returns your dictionary. Your expression would then be:
= apply(
rule!XYZ_labelValue(
label: _,
value: _
),
merge(
pv!eventDataLabels_txt,
pv!eventDataValues_txt
)
)
XYZ_labelValue would just return {label: ri!label, value: ri!value}.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
judym598
Certified Senior Developer
over 7 years ago
Thanks @carloss! I'll give that a try. FYI - The 'tolabelvaluearray()' function was included in a 'Tempo Utilities' plugin that is no longer available. I had that plugin removed and wanted to update with OOTB functions.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
venkateshamu
A Score Level 2
over 7 years ago
@judym598, AFAIK false() is not required. Could you try by removing false() like below snippet.
{label: pv!eventDataLabels_txt, value: pv!eventDataValues_txt}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
judym598
Certified Senior Developer
over 7 years ago
@venkateshamu - I tried that and the display of the list did not change. I did try @carloss's suggestion and it worked! Thank you both for your help!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel