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
6 replies
Subscribers
7 subscribers
Views
2403 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
I have a cdt which have two fields [field1=,field2=150],[field1=230,
Dharsana
Certified Senior Developer
over 9 years ago
I have a cdt which have two fields
[field1=,field2=150],[field1=230,field2=],[field1=23,field2=]
Either field1 or field2 will have a value in each record. I need to Check which field is not empty and display in the single column of the grid.
Please help
OriginalPostID-179377
OriginalPostID-179377
Discussion posts and replies are publicly visible
0
Stefan Helzle
A Score Level 3
over 9 years ago
Why not create an expression that checks which value is available and then shows that. You can apply this to your list of CDTs.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
srinivasulup
Certified Lead Developer
over 9 years ago
fn!apply(rule!customRule(_), ri!array)
customRule:
fn!if(
fn!isnull(
ri!array.field1
),
ri!array.field2,
ri!array.field1
)
This gives you an array and map the same to the grid field.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Dharsana
Certified Senior Developer
over 9 years ago
i dont want to update the cdt.. only while displaying in grid i need to apply
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
srinivasulup
Certified Lead Developer
over 9 years ago
Here you are not updating the original CDT, store the result in the temporary variable and map to the grid
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
harshav
over 9 years ago
may be you can try like this, write a expression like if(isnull(field1),field2,field1)
Then you do this function in apply like apply(fn!rulesaidabove,merge(field1,field2))
May be you need to do a little work around if the merge is not working, Hope this would help!!! :)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Shyam Bommakanti
Certified Lead Developer
over 9 years ago
If you have Appian common objects app deployed, there's a rule you can use
APN_replaceNull (Returns nullableValue only if it is not null. Else return replacementValue.)
Use apply on the grid it will only display and not update CDT.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel