Skip to main content
16-Pearl
March 9, 2021
Solved

Get Number of times update done for a single row in Datatable (Thingworx 9.1)

  • March 9, 2021
  • 1 reply
  • 846 views

Hi ,

I am having one use case in that i need to check how many times a end user can change/update the particular field value. for Example

ID(Primary key) UserID
1 101
2 102

above table there will be restriction to update userID (Max 2 times can change/update a userID for ID 1) same will be for ID 2. how we can achieve this in TWX 9.1.

 

Thanks 

Best answer by CharlesJi

Hi @VaibhavShinde,

 

I guess you can create customized services for such field updates.

In those customized services, you may achieve the following logic:

 

if changed_time_of_xxx is over 2

  then return false

  else

    update the field

    changed_time_of_xxx increases 1

    return true

 

You may want to create another table where stores how many times a field has been changed (i.e., changed_time_of_xxx).

1 reply

CharlesJi16-PearlAnswer
16-Pearl
March 10, 2021

Hi @VaibhavShinde,

 

I guess you can create customized services for such field updates.

In those customized services, you may achieve the following logic:

 

if changed_time_of_xxx is over 2

  then return false

  else

    update the field

    changed_time_of_xxx increases 1

    return true

 

You may want to create another table where stores how many times a field has been changed (i.e., changed_time_of_xxx).