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
11 replies
Subscribers
11 subscribers
Views
4432 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Data and Records
Try to use rf!data to show and hide visibilities of related action. rf!data
sushilk872
over 7 years ago
Try to use rf!data to show and hide visibilities of related action.
rf!data is displayed well in record list grid view...However, same check not working in related action visibility field.
check is simple : rf!status.code="PEND" , rf!status.code is displaying in Grid .
let me know what i am doing, if this due to nested cdt or multiple record.
Suggest me workaround.
Thanks
OriginalPostID-221228
OriginalPostID-221228
Discussion posts and replies are publicly visible
0
Sally Mason
Appian Employee
over 7 years ago
Hi Sushil, I would recommend trying rp!status.code="PEND" if possible. Let us know if that resolves your issue for related action?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 7 years ago
@sushilk Hi, would you please be able to try the below expression and do let us know if it works?
fn!cast(fn!typeof(fn!true()),rf!status.code="PEND")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sushilk872
over 7 years ago
@sally from where rp values come in record ?, currently its ID and Type coming to me ...
@sikhivahans, seem rf!status.code value is not available, or it is comparing first record only.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 7 years ago
@sushilk Would it be possible to attach the CDT's snapshot or atleast know us the details such as data type and multiplicity of 'status' and 'code'? Then the practitioners can comment on its availability in the areas such as Record Filters, Visibility expressions etc.
If you are expecting multiplicity in the values(be it a local variable or record field or result of expression/query) you are making use of in the checks that drives the visibility, I would suggest applying casting or a similar logic(such as fn!and(),fn!or() etc) over the resultant value.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sushilk872
over 7 years ago
Attached is CDT and Product record
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 7 years ago
@sushilk As per my observation, 'status' and the 'code' inside the status are single, and so there shouldn't be any problem in accessing or utilising the status.code. Is there a chance for existence of null values in 'status' or 'status.code' fields? If so, can you rewrite the visibility expression as follows and test it again?
=fn!if(
\trule!APN_isEmpty(rf!status),
\tfn!false,
\tfn!if(
\ trule!APN_isBlank(rf!status.code),
\ tfn!false(),
\ tfn!and(rf!status.code="PEND")
\t)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sushilk872
over 7 years ago
@sikhivahan... nops no success, some how value is not retaining till related action window. If i try to access other value whch are not in CDT,they are available what not those which are in CDT , i tried with productType.cpde<>RPP. no success.
So seem in related action , i am not able to access nested CDT..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sally Mason
Appian Employee
over 7 years ago
Hi Sushil,
Please refer to the answer given in your support case - if you find that works, please share the answer here with everyone.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 7 years ago
The problem is that your record is service backed and is returning more than 1 item. You can confirm this by editing your rule that generates the record title, which uses the same expression you use to retrieve the record from your web service, and print:
local!data.status
You'll see that the web service is returning something of type
PEND; PEND; PEND; PEND; PEND; PEND; PEND; GRAN; PEND; GRAN
since Appian can only use rf! to map to a single record, it is picking the first result your expression is returning thus resulting in the evaluation of
rf!status.code="PEND"
to be true.
You need to re-design your expression that defines this service backed record to only return one result. Maybe doing a lookup the same way you're doing it to find the right record title.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sushilk872
over 7 years ago
Issue has been fixed using rsp query in source expression. Use given method to get rp!id, check rp!idvalue, if value exist then call webservice by passing value. else call all.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>