# Error in Audit Log Section

**URL:** <https://community.yeeflow.com/t/error-in-audit-log-section/184>\
**Category:** Ask the community\
**Created:** [June 8, 2023, 7:14am UTC](https://community.yeeflow.com/t/error-in-audit-log-section/184 "2023-06-08T07:14:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy\_wong](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.yeeflow.com/andy_wong/32/363_2.png) [@andy\_wong](https://community.yeeflow.com/u/andy_wong)\
**Post date:** [June 8, 2023, 7:14am UTC](https://community.yeeflow.com/t/error-in-audit-log-section/184/1 "2023-06-08T07:14:58Z")

</div>

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”

 ![Untitled](https://canada1.discourse-cdn.com/flex032/uploads/yeeflow/original/1X/aa5f95c9dca1690a128fb8dbc6ed1c658e0fd316.jpeg)

May I know if I make a mistake?

Thanks a lot

Best regards,  
Andy

---

<div class="post-metadata">

**Author:** ![frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@frank](https://community.yeeflow.com/u/frank)\
**Post date:** [June 12, 2023, 1:45am UTC](https://community.yeeflow.com/t/error-in-audit-log-section/184/2 "2023-06-12T01:45:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![andy\_wong](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.yeeflow.com/andy_wong/32/363_2.png) [@andy\_wong](https://community.yeeflow.com/u/andy_wong)\
**Post date:** [June 19, 2023, 4:12am UTC](https://community.yeeflow.com/t/error-in-audit-log-section/184/3 "2023-06-19T04:12:36Z")

</div>

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](https://canada1.discourse-cdn.com/flex032/uploads/yeeflow/original/1X/af499725bec283d4380fedf56771ad4b4bf60fce.png)

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

---

<div class="post-metadata">

**Author:** ![frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@frank](https://community.yeeflow.com/u/frank)\
**Post date:** [June 19, 2023, 7:58am UTC](https://community.yeeflow.com/t/error-in-audit-log-section/184/4 "2023-06-19T07:58:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![andy\_wong](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.yeeflow.com/andy_wong/32/363_2.png) [@andy\_wong](https://community.yeeflow.com/u/andy_wong)\
**Post date:** [June 20, 2023, 2:13am UTC](https://community.yeeflow.com/t/error-in-audit-log-section/184/5 "2023-06-20T02:13:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@frank](https://community.yeeflow.com/u/frank)\
**Post date:** [June 20, 2023, 10:17am UTC](https://community.yeeflow.com/t/error-in-audit-log-section/184/6 "2023-06-20T10:17:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![andy\_wong](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.yeeflow.com/andy_wong/32/363_2.png) [@andy\_wong](https://community.yeeflow.com/u/andy_wong)\
**Post date:** [June 21, 2023, 3:21am UTC](https://community.yeeflow.com/t/error-in-audit-log-section/184/7 "2023-06-21T03:21:17Z")

</div>

Hi Frank,

Thanks a lot

Best regards,  
Andy
