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
7 subscribers
Views
1642 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Does Appian recognize new values added to a CDT (and saved newValue with depende
davidj578
over 9 years ago
Does Appian recognize new values added to a CDT (and saved newValue with dependencies updated) if they are added after a SAIL Form has been using the CDT for some time? I am getting this error and it is not clear why:
An Error Has Occurred
Expression evaluation error in rule 'serviceOrderEntryForm' at function a!buttonWidgetSubmit [line 376]: An error occurred while executing a save: java.lang.IllegalArgumentException: Invalid index: Cannot index property 'newValue' into type serviceOrder^3
OriginalPostID-155889
OriginalPostID-155889
Discussion posts and replies are publicly visible
0
sikhivahans
over 9 years ago
@davidj I guess a possible reason for it could be is, you might be using a type constructor for building the variable of type 'serviceOrder' (i.e. type!serviceOrder(field1:value1,field2:value2)) in the expression rule and the definition might not be updated during impact analysis which again could be because of the reason that the expression rule using type constructor might not be in the application (I guess this constraint isn't present from 7.9 onwards) when impact analysis was carried out. So I would like to suggest to check if any rules (triggered upon clicking the button in the SAIL interface) are making use of type constructor for 'serviceOrder' cdt.
If my guess with respect to issue is correct, the solution could be probably as either of the follows:
1. Manually update the definition of 'serviceOrder' in the rule which you are using type constructor.
2. Add the rules which make use of 'serviceOrder' type constructor to the application and perform the Impact Analysis again.
An other possible cause could be is because of referring the removed field using dot notation. For instance, let's say a field by name 'field1' is removed from the definition of cdt, but referring the same field using dot notation cdt.field1 results in an error. Also I would like to recommend to update these kind of reference in case of removal of fields.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Conor Cahill
Certified Lead Developer
over 9 years ago
The SAIL form uses whatever the model feeds it on load. If the model has the old version (without the new fields), then the SAIL form will also be using the old version. I know in 7.9 you can specify the exact type of CDT as a parameter (instead of just 'Any Type'), so I'm not sure what the effect would be in that case.
I would suggest checking if the field exists before trying to perform the save (or perhaps hide the new user input fields when looking at it in an older model).
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@davidj One more point which I have forgotten to add and added by conorc is, stay away from the usage of new fields in the instances initiated before updates in CDT for saving purpose, but you can use them for reading purpose.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
davidj578
over 9 years ago
Thank you both for your comments. I was able to solve this by deleting the CDT and recreating it. Those steps worked but are not intuitive. Changes to CDTs should be accepted when a Users saves the change and selects update dependents.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel