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
12 replies
Subscribers
7 subscribers
Views
3513 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
We have an issue with a variable overwriting another variable within a sail form
ashleyb
over 8 years ago
We have an issue with a variable overwriting another variable within a sail form. These variables initially have the same value and then one is modified by the user while the other remains a "read only" version. The issue we are having is when the user edit's the editable variable, the values are being overwritten in the "read only" variabe - before anything is saved to the databse (the database is the original source for both).
load(
/*Retrieving fresh exception data from the SQL database before populating to the user (Added with Release 6)*/
ri!eadOnly_exceptionDetails_cdt : rule!CAC_getExceptionByIDAndNotStatus(ri!exceptionDetails_cdt.crsExceptionID, "Cleared"),
ri!exceptionDetails_cdt : rule!CAC_getExceptionByIDAndNotStatus(ri!exceptionDetails_cdt.crsExceptionID, "Cleared"),
local!noDocAttached_bool: if(
getdocumentsfromfolder(
rule!findExactFolderNameMatch(
ri!exceptionDetails_cdt.crsExceptionID
),
...
OriginalPostID-168667
OriginalPostID-168667
Discussion posts and replies are publicly visible
Parents
0
ashleyb
over 8 years ago
... a document type...",
choiceLabels: cons!CAC_CM_DOCUMENT_TYPES,
choiceValues: cons!CAC_CM_DOCUMENT_TYPES,
value: ri!documentType_text,
saveInto: ri!documentType_text
),
a!textField(
label: "Auxiliary",
readOnly: local!noDocAttached_bool,
value: ri!auxiliary_text,
saveInto: ri!auxiliary_text
)
}
)/*end if no doc check*/
),
rule!CAC_Exception_Display_Documents(
ri!exceptionDetails_cdt
),
a!textField(
label: "",
readOnly: true,
refreshAfter: "KEYPRESS",
value: if(
local!noDocAttached_bool,
{},
if(
contains(
cons!CAC_CM_ACCEPTED_FILE_EXTENSIONS,
ri!DocumentExtension_Txt
),
{},
cons!CAC_CM_ACCEPTED_FILE_EXTENSIONS_MSG & ri!DocumentExtensio...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
ashleyb
over 8 years ago
... a document type...",
choiceLabels: cons!CAC_CM_DOCUMENT_TYPES,
choiceValues: cons!CAC_CM_DOCUMENT_TYPES,
value: ri!documentType_text,
saveInto: ri!documentType_text
),
a!textField(
label: "Auxiliary",
readOnly: local!noDocAttached_bool,
value: ri!auxiliary_text,
saveInto: ri!auxiliary_text
)
}
)/*end if no doc check*/
),
rule!CAC_Exception_Display_Documents(
ri!exceptionDetails_cdt
),
a!textField(
label: "",
readOnly: true,
refreshAfter: "KEYPRESS",
value: if(
local!noDocAttached_bool,
{},
if(
contains(
cons!CAC_CM_ACCEPTED_FILE_EXTENSIONS,
ri!DocumentExtension_Txt
),
{},
cons!CAC_CM_ACCEPTED_FILE_EXTENSIONS_MSG & ri!DocumentExtensio...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data