is it possible to make a specific field writeable when empty or if its a amdin

V

so i want another user(editor) to be able to write if the field is stil empty

 

i wrote this for writeable if in that specific field:

null or userHasRole ("admin")

but it doesn't seem to work. the problem is that i invited editors and they can't edit the fields when they created a new record. the editor should be able to create a record(this is already good) and then be albe to fill in data only once

Ninox Profile

This worked from me on the cloud version .. 

role

DANGER.. for a regular user.. once the TAB off the field. it is locked.... If you want to keep it open until intentionally "saved" .. add a "Save" button and an attribute .. 

Ninox Profile

oops.. here is the form. 

editOnce

V

very happy with your help! so this first one is working perfectly

let t := this;
t.Straatnaam = null or if 'Created on' + time(0, 15) < now() then
false
else
true or userHasRole("admin")
end

now i was wondering if i also could combine the timer with the modification_date if it was still null i've tried it like this (see below)but that doesn't seem to work. i just want to avoid the save button because then you would risk forgetting the save button and the field becomes always editeable. (correct me if i'm wrong i am just starting to understand the code writing)  

let t := this; t.Straatnaam = if null then _md + time(0, 15) < now() or if 'Created on' + time(0, 15) < now() then
false
else
true or userHasRole("admin")
end

Reply