Error in Audit Log Section

Hi All,

I try to use API to update a datalist. I found that if I specify RowVersion to0. the row can update successfully. However, if I want to update a specific version. The response always returns “appID or listid invalid”

May I know if I make a mistake?

Thanks a lot

Best regards,
Andy

Hi Andy,

You can use 3 instead of 3.0. The parameter RowVersion is of type Integer. To ensure proper functionality, make sure to use the get method for retrieving the latest RowVersion of the item.

Regards,
Frank

Hi Frank,

Thanks for your information

I try to get the row using Datalist Query API and I confuse with the return result

{
“Data”: [
{
“TenantID”: “1528618473896022016”,
“AppID”: “41”,
“ListID”: “1655857881962782720”,
“ListDataID”: “1663833337529634816”,
“RowVersion”: “8”,
“Created”: “2023-05-31T09:02:34Z”,
“CreatedBy”: “1589443654662754304”,
“Modified”: “2023-06-08T07:10:40Z”,
“ModifiedBy”: “1536564830136963072”,
“Title”: “Hello 2”,
“Text1”: “”,
“Text2”: “test”,
“Decimal1”: “112”,
“Text6”: “911”,
“Text7”: “”,
“Text8”: “”,
“Text3”: “1656547149878140928”,
“Text4”: “”,
“Text5”: “”,
“Text9”: “”,
“Text10”: “”,
“Text11”: “”,
“Text12”: “b542f2c3-7499-4ff5-a530-9b5bbb7c7057”,
“Datetime1”: “2023-05-01”,
“Text13”: “”,
“Text14”: “”,
“Text15”: “”
}
],
“Status”: 0,
“Message”: null,
“TotalCount”: 1
}

The return result states that the RowVersion is 8.0 but I found the latest version in YeeFlow Version History is not 8

Then I use the below data for Datlist Patch API can successfully patch the row
{
“RowVersion”: 8,
“Data”: {
“Decimal1”: “999”
}
}

But the latest RowVersion is still less then 8
screen_cap

If I try to update the previous version, say 5, it return below result
{
“Data”: null,
“Status”: 540010,
“Message”: “version not equals”,
“TotalCount”: 0
}

May I know if is it impossible to update the previous version?

Thanks a lot

Hi Andy,

Sorry for the confusion. The RowVersion is an incremental number on each item’s edit. Version is a feature only available when enabled. They are not consistent.

Regards,
Frank

Hi Frank,

Thanks for your reply. I just try a test with the below steps:

  1. Create a new datalist and enable versioning
  2. Query the new datalist and get the row in the datalist
  3. Update the datalist using the datalist update API

The field can be updated successfully. Then I try to update again so that there are at least two versions of the same row. The latest version is 2.

Now I try to update the same row in the datalist again but I specify the version is 1. Then the result is “version not equals”.

From the test, it seems I can update the latest version only. I cannot update the previous version. Is my understanding correct?

Thanks a lot

Best regards,
Andy

Hi Andy,

Assuming a scenario where you use a query API to obtain details of an Item and then update some of its properties based on the Item’s value. If someone else modifies the Item during this process, you may make incorrect judgments or overwrite their modifications when you try to modify it. The purpose of RowVersion is to ensure that the object you modify is consistent with what was obtained in the query. If the update prompts are inconsistent, it means that someone else has modified the Item.

And Yes, you cannot update the previous version.

Regards,
Frank

Hi Frank,

Thanks a lot

Best regards,
Andy