Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Meaning that the form that uses the data from a source form sets the counter about how many times the data have been used. And there is a delete rule on source form to check the "used counter" and fail the deletion of the used count is more than 0


Info

Virtual functions has now a function to query count (queryCount) matching your criteria, using this function in the condition of "Validate on delete" rule is much more simpler than implementing the counter and counting the use of values



ConfiForms Form Definition
formNamef


 

profileNameprofileNametext

 


usedUsedfalsehidden

usedcountUsed count0hidden

used:truetrueCreate ConfiForms EntryonModifiedentryId=[entry.id]&usedcount=([entry.usedcount]+1)&used=truef:12222622

 

used:falsetrueCreate ConfiForms EntryonModifiedentryId=[entry.id]&usedcount=([entry.usedcount]-1)&used=falsef:12222622

 

usedcount:>0You cannot edit this record (it is used (referenced) in other form)Validate on delete

ConfiForms Form Definition
formNamef1


 

profileNameprofileName[12222622|f|profileName|true||]smartselect

trueCreate ConfiForms EntryonCreatedentryId=[entry.profileName]&used=truef:12222622

 

truehasChanged(profileName):trueCreate ConfiForms EntryonModifiedentryId=[entry._previousState.profileName]&used=falsef:12222622

 

truehasChanged(profileName):trueCreate ConfiForms EntryonModifiedentryId=[entry.profileName]&used=truef:12222622

 

trueCreate ConfiForms EntryonDeletedentryId=[entry.profileName]&used=falsef:12222622

 

Records in f

ConfiForms TableView
formNamef

profileName

usedcount

...


Recods in f2 


ConfiForms TableView
formNamef1

profileName 


Source code for the solution

...