How to add row to list view with out adding to database

  • 17 April 2013
  • 4 replies
  • 1 view

Badge +1

Hi


We have a scenario where a form has a list view with multiple items with reference to parent table, which has to be saved to database only when the main form saved to database.


In the  list view how do we achieve this?


Thanks in advance!


 


 


 


 


4 replies

Badge +5

The add button by defualt commits data in the way that you are describing you don't want it to.  So don't use the "add" check box in the Details tab but rather create your own add button.  Wire it up so that it "Adds a row" to the editable list.


Make sure that you have "apply the changes made to the row on the mList - (Item List) editable list" with a few other rules as well,  otherwise the add button won't work the second time.


Your submit button rule will look something like this:


When Submit is Clicked


then complete the following concurrently
and apply the changes made to the row on the mList - (Item List) editable list


then complete the following one after another
then on mainFormItem - (Main Form ) View, execute its Update method (configure)


then on mList - (Item List) View, execute the Update method for all the items that have been Changed (configure)
then on mList - (Item List) View, execute the Delete method for all the items that have been Removed (configure)
then on mList - (Item List) View, execute the Create method for all the items that have been Added (configure)

Badge +4

Hi Wilner, I have a case where I need to add a new row but with the default values of the last row, can you please give a hint.


I was thinking on creating a second smartform but would be neat if it can be done directly on the new row.


 


Thanks in advance.

Badge +5

When I have users fill in a row that has more than 3 fields, I use a sub form.  If you do the same you could use some data lables from your sub-form and then pass them in to some data labeles called "lastRowData".  After that it would be easy to pass those lables into a next row based on a button.  I'm back to work Thursday, feel free to give me a call an I can walk you through it if you need. 


Best of luck,


Brian


401-847-2260 x3353

Badge +4

Hi Brian .. I followed your advise and it really looks good and I have more control on the default values and design en general. Thank you!


Karina

Reply