Skip to main content
Nintex Community Menu Bar

Updating multiple records in/with a smartobject

  • March 24, 2009
  • 2 replies
  • 10 views

Forum|alt.badge.img+2

Hi,


 I have mutiple records in a table with an Autonumber as the primary key.


 How would I go about updating a number of those records using a smartobject/service method.


Eg:


TableID - Autonumber


Field1 - Number


Field2 - Text


Field3 - Date


Field4 - Number


Normal SQL Server syntax would be:


Update MyTable SET Field1 = 5, Field2 = 'Updated' WHERE Field4 = 67 AND Date >= '2009-01-01'


I tried similiar syntax with K2 and it created a new record and did not update the existing records.


 I would imagine the delete syntax would have a similar problem??? 


 

2 replies

Forum|alt.badge.img+8
  • March 25, 2009

Are you using the Dynamic SQL Service object from the BlackMarket?  If so I don't believe that functionality was implemented.  You would probably need to create your own service method to achieve this. The other option is to loop through the data set calling the standard update method for each item. 


-Eric 


Forum|alt.badge.img+9
  • March 27, 2009
You would have to specify the TableID in your SmartObject update call, or else it will assume you wanted to create a new record