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
8 replies
Subscribers
7 subscribers
Views
4786 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
#SAIL I'm looking for a way to hide and show certain fields in a
brandonc
over 8 years ago
#SAIL
I'm looking for a way to hide and show certain fields in a section but keep getting an error when the if statements return a null because I don't want any of the fields to show up and can not have a blank item present.
"Interface Definition: Expression evaluation error at function a!sectionLayout [line 29]: The contents field on a column layout cannot be a list containing a null. Invalid value at index 1."
What is the best way to handle this?
I have tried doing the complete column into an expression and grab it using a load() but the expression is only returning the first item not any of the others
OriginalPostID-169245
OriginalPostID-169245
Discussion posts and replies are publicly visible
Parents
0
sikhivahans
over 8 years ago
@brandonc As said by others, the empty lists or null might not work in all the cases as far as my SAIL experience is considered(Atleast it didn't work for us..!). There are two ways to tackle this and this is how we did:
Approach - 1:
In place of null or empty list, we do provide a component which is not surfaced to end user. You may opt for this approach if you feel that this hidden component doesn't disturb the layout or alignment in the interface.
if(
\t
,
\t{show desired component},
\t{a!textField(label:"",value:"",readOnly:true)}
)
Approach - 2:
You may opt for this approach if you feel that the Approach - 1 disturbs the layout or alignment in the interface.
if(
\t
,
\ta!sectionLayout(
\ tlabel:"Some Section",
\ tfirstColumnContents:{
\ t
\ t}
\t),
\ta!sectionLayout(
\ tlabel:"Some Section",
\ tfirstColumnContents:{
\ t
\ t}
\t)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
sikhivahans
over 8 years ago
@brandonc As said by others, the empty lists or null might not work in all the cases as far as my SAIL experience is considered(Atleast it didn't work for us..!). There are two ways to tackle this and this is how we did:
Approach - 1:
In place of null or empty list, we do provide a component which is not surfaced to end user. You may opt for this approach if you feel that this hidden component doesn't disturb the layout or alignment in the interface.
if(
\t
,
\t{show desired component},
\t{a!textField(label:"",value:"",readOnly:true)}
)
Approach - 2:
You may opt for this approach if you feel that the Approach - 1 disturbs the layout or alignment in the interface.
if(
\t
,
\ta!sectionLayout(
\ tlabel:"Some Section",
\ tfirstColumnContents:{
\ t
\ t}
\t),
\ta!sectionLayout(
\ tlabel:"Some Section",
\ tfirstColumnContents:{
\ t
\ t}
\t)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data