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
18 replies
Subscribers
7 subscribers
Views
7696 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Expression evaluation error at function a!util_sasaUiSource: An error occurred w
deepanc712
over 9 years ago
Expression evaluation error at function a!util_sasaUiSource: An error occurred while executing a save: java.lang.NullPointerException.
The dataset is loading perfectly good on sail environment but the same is returning null pointer exception..
The objective is to add/remove country to a paging grid.
Can some one help
Thanks in advance.
pagingGrid3.sail
OriginalPostID-149871
OriginalPostID-149871
Discussion posts and replies are publicly visible
0
Aleksi White
Appian Employee
over 9 years ago
I'm not seeing any mention of a!util_sasaUiSource in the SAIL code you provided. Is it called within a rule that is referenced on that SAIL form?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
deepanc712
over 9 years ago
The exception triggers when the user clicks the "Add Country" button widget
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Aleksi White
Appian Employee
over 9 years ago
What is the reasoning behind using if(1, <condition 1>, <condition 2>)? This will always evaluate to return condition 1. Are all of the variables that are being returned holding data? The null point exception makes it seem like one or more of these are returning null
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
deepanc712
over 9 years ago
I added the value 1 to check the condition for verification purpose later I'll change that the the count >0 of the incoming variable.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@deepanc Quick observations:
1. associatedRegions is initiated as an array variable in load().
local!associatedRegions:{}
2. But under "Add country" button you are expecting the same variable to behave as an CDT which is not right as per my knowledge. So this could be cause of an issue.
Example:
local!associatedRegions.REGION_EID
local!associatedRegions.NAME
In order to resolve this, initialise the associatedRegions to the desired cdt type. For instance it should be local!associatedRegions: {type!my_CDT()}. Go with this resolution only if you expect local!associatedRegions to behave as CDT. Else plan for an alternative way of coding.
Also please note that, under the "Add country" button component, you are using 'apend' instead of append which will result in an error down the line when you include a valid condition in if().
a!save(local!associatedRegions.REGION_EID,if(1, local!unassignedRegionID,apend(local!associatedRegions.REGION_EID, local!unassignedRegionID)))
AFAIK a!util_sasaUiSource() is an internal function used by Appian while rendering UI and this hasn't been exposed to us. I often see it in errors. So I guess we don't need to think about it.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
deepanc712
over 9 years ago
@SIK, Thanks Sik, I have realised and corrected the same and I slightly modified the code now to still simplify the logic.I'm able to get expected data, but now the challenge is all the records are getting added to one column.. but that should go as one by one on the paging grid
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@deepanc No problem, please go through the attached code and do let me know if you have any follow up questions.
pagingGrid3.sail
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
deepanc712
over 9 years ago
@ SJK, Thanks for the code., The Form is displaying values good when I pass as a parameters, but on the execution time the SAIL form is ending up with Exception message "Interface Definition: Expression evaluation error at function a!formLayout [line 23]: A grid component [label=“Assigned Countries”] has an invalid value for “identifiers”. None of the values in “identifiers” can be null." ....can you suggest...
Thanks,
Deepan
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
deepanc712
over 9 years ago
The grid cannot load the value of CDT as the same is returning null.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@deepanc Seems like there are null values in the local!datasubset.data.REGION_EID. I am assuming that REGION_EID is a unique key. Is it possible?
Additionally please ensure that debugging is made by checking how the values are being appended to ri!pl_associatedRegion.
Please do let me know if you have questions.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>