if add new row selected submit saves blank entry

  • 29 December 2017
  • 5 replies
  • 16 views

Badge +8

I have a data entry form with some controls, and then an editable list

the editable list has 2 fields for data entry

if i add rows, and add data correctly,and press submit,my data is entered correctly into SQL

 

if i enter data correctly,and then if i add a row by mistake, and not add any data to the fields.  i press submit, and my data saves, but my correctly entered line of data doesn't get updated into SQL correctly

 

i have 2 attachments to show the entry form

with 1 entry set, and then a blank line

the 2nd attachment shows SQL not saving the data correctly


13514iBAE5767C81598651.png
13585i00D5B1FF533E8914.png


5 replies

Userlevel 5
Badge +18

How is the rule on your submit button configured?


 


Perhaps SmartObject logging can be enabled to see what is happening:


https://help.k2.com/kb000298


 


Maybe it is not passing in the input at all.  Or writing the data from the first row, and then wiping it out from the second row.  This is likely a behavior of how the rules are configured or how the SmartObject/Create/Save method was implemented, as I do not see a similar behavior when generating an Editable List view from a simple SmartBox SmartObject.  If so, likely we will need to revise how the rules are configured or methods are implemented.


 

Badge +8

i configure it to enter all data needed into the SMO

Userlevel 5
Badge +18

In a generated editable list view (as an example), there is also a rule that indicates:


 


When the view executed 'List item added'


         then apply the changes made to the row on the editable list


 



 


Please try adding a similar rule on the View or on the Form, so see if it will handle the empty row case more correctly.


 


 


 


 

Badge +8

hi, i do have that rule on my view

 

Userlevel 5
Badge +18

It looks like the "then apply the changes made to the row on the editable list" action will only be executed if it meets the advanced condition.


 


As a possible test, please also add this same rule to the 'else' block to see if the behavior changes or not; this would tell us if it is related to this rule.

Reply