Hello All,
I'm displaying integerField control inside an editable grid. The information added is getting saved in database table. The problem which is happening here is related to error message that user is not getting while entering any text value in the field. If user enters any non numeric value then it gets cleared out after mouse unfocus and again if we enter any non numeric characters only then it displays error message. Can somebody help me to figure out why is this happening?
Below is the code i'm using
a!integerField( value:ri!AllTaskData_cdt.ContentMetricValue, validationGroup: "EditContentMetrics", required: true, saveInto:{ a!save( ri!AllTaskData_cdt.ContentMetricValue, if( or( isnull(save!value), len(save!value)=0 ), null, save!value ) ), a!save( ri!updatedTaskData_cdt[ri!index].ContentMetricValue, if( or( isnull(save!value), len(save!value)=0 ), null, save!value ) ) })
Where AllTaskData_cdt and updatedtaskData_cdt is a cdt. AllTaskData_cdt is the variable which actually holds the value and updatedTaskData_cdt is used to store the updated values. The call to this rule is made from another interface where a!foreach() loop is running and hence one by one it sends the value for AllTaskData_cdt and that is why this variable is not declared as an array here
Discussion posts and replies are publicly visible
Hi viveku0001,
Can you please go through it.
Hi Ravalik,
As I said I already tried KEYPRESS but still getting the same response. Please find the attached screenshot
I have tried the below code in Appian 17.4 it is throwing an error on Key press. Not sure why it is not working in your case. It should work as ravalik suggested.
load( local!a: { 0, 0 }, a!gridLayout( label: "Label", labelPosition: "ABOVE", headerCells: { a!gridLayoutHeaderCell( label: "Header Label" ), a!gridLayoutHeaderCell( label: "Header Label" ) }, columnConfigs: {}, rows: { a!forEach( items: { 1, 2 }, expression: a!gridRowLayout( contents: { a!richTextDisplayField( value: a!richTextItem( text: "Integer", style: "STRONG" ) ), a!integerField( label: "Label", labelPosition: "ABOVE", value: local!a[fv!index], saveInto: { local!a[fv!index] }, refreshAfter: "KEYPRESS", validations: {} ) } ) ) }, selectionSaveInto: {}, validations: {}, shadeAlternateRows: true ) )