Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!
The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.
Here is my code. I have one editable grid in which one priority field is there:
a!integerField(label: "Priority",labelPosition: "ABOVE",value: if(not(isnull(fv!item.priority)),int(fv!item.priority)-rule!CRP_CheckPriority(fv!item.priority,fv!item.contentdomain),fv!item.priority),/*saveInto: a!save(fv!item.priority,if(rule!CRP_CheckPriority(fv!item.priority,fv!item.contentdomain)>0,a!save(save!value,int(fv!item.priority)-rule!CRP_CheckPriority(fv!item.priority,fv!item.contentdomain)),save!value)), */saveInto: {a!save(fv!item.priority,save!value)/*if(rule!CRP_CheckPriority(fv!item.priority,fv!item.contentdomain)>0,a!save(fv!item.priority,int(fv!item.priority)-rule!CRP_CheckPriority(fv!item.priority,fv!item.contentdomain)),a!save(fv!item.priority,save!value))*/},refreshAfter: "UNFOCUS",readOnly: if(local!gridreadonly="Edit",true,false),validations: {if(and(local!gridreadonly="Save",not (isnull(fv!item.priority))),{if(count(rule!CRP_GetPriority(priority: fv!item.priority,contentdomain: fv!item.contentdomain,id:fv!item.id)) >0,"This Priority is already assigned to other Project..",null)},{}),if(and(not (isnull(fv!item.priority)),int(fv!item.priority)>10),"Priority must be between 1 and 10","")}),
Here one of the value of priority field of grid fv!item.priority is 10 which is in database . when the grid is displayed it shows value 5 that is right as per my code in value line. But when i save the data it stores 10 not 5. but i want 5 to be stored in database. Tell me solution. what is the wrong in my code.
Please reply asap.
Discussion posts and replies are publicly visible
Thanks Peter it works and i got my solution. Thanks for Help.