0

Locking records

Hi. I have a table A with many formulas, linked other another tables; B, C and D. Values in B, C and D will change, but I want to lock the records (values) that I have created in A so that these don't change. 
Any good solutions to achieve this? Either somehow locking the data (also of formulas) or copy and paste as static values into a new table? As far as I can tell, "Writable if" does not data gathered from formulas. 

4 replies

null
    • Choices_Software_Dean
    • 3 yrs ago
    • Reported - view

    Did you set "Writable if" property to null?

    • Compleasy
    • silver_bee
    • 3 yrs ago
    • Reported - view

    I already have a parameter that blocks new entries in the "writable if" field. It does block writing, but values in the formula fields change anyway. 
    I also tried to enter null in "writeable if", but then I can't create new entries, probably because one of the formulas is (a*b), thus already having a 0 value upon creation. 

    • Mconneen
    • 3 yrs ago
    • Reported - view

    Let me see if I follow you. Let's assume the following

    Table B.bar := 5
    Table C.snafu := 4
    Table A.foo is a forumla of

    B.bar + C.snafu

    Which at this momment in time, is 9.

    When do you want to "lock" A.foo to the value 9?

    Let us assume it is when you set A.Lock to True. One approach is to create a hidden field.. A.HiddenFoo.. Then, make the A.foo fromula something like.

    if not A.Lock then
       A.HiddenFoo = B.bar + C.snafu;
    end;
    A.HiddenFoo;

    • Compleasy
    • silver_bee
    • 3 yrs ago
    • Reported - view

    Thanks, Mconneen. This is very helpful. I didn't get it too work, possibly because B and C also are formulas with many contingencies. I think the easiest would be to copy values from the "live" table to static fields in a different table, as numbers not dependant on values in any other fields. It can be after update or when lock parameter is activated. Any thoughts?

Content aside

  • 3 yrs agoLast active
  • 4Replies
  • 961Views