cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

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

VaibhavShinde
16-Pearl

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

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 

1 ACCEPTED SOLUTION

Accepted Solutions
CharlesJi
14-Alexandrite
(To:VaibhavShinde)

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).

View solution in original post

1 REPLY 1
CharlesJi
14-Alexandrite
(To:VaibhavShinde)

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).

Top Tags