Hello Community,
I wondered if there is a possibility to make a field readonly if there is a value entered into another field?
field decimal ${CT_SPI40} if user enters a value, make field decimal ${CT_SPI20} readonly.
Any assistance would be appreciated.
Best,
Christopher
Solved! Go to Solution.
Yes you can put a formula in the read only column skipping the drop down. It will complain at you at first but it does work.
Something like
${CT_SPI40} != ''
or sometimes you have to to string-length(${CT_SPI40}) > 0
(Yes I know its a decimal field but 123 starts with everything as a string so this actually works.)
Hi @ChristopherMask ,
Thanks for sharing here. I think there is a workaround method:
1. Set "body::esri:visible" for ${CT_SPI20} to make it only visible when ${CT_SPI40} is null
2. Add another note question which equals ${CT_SPI20} and make it only visible when ${CT_SPI40} is not null
Thanks,
Ruth
Yes you can put a formula in the read only column skipping the drop down. It will complain at you at first but it does work.
Something like
${CT_SPI40} != ''
or sometimes you have to to string-length(${CT_SPI40}) > 0
(Yes I know its a decimal field but 123 starts with everything as a string so this actually works.)
Ended up using
string-length(${CT_SPI40}) > 0
for the readonly field ${CT_SPI20}
Also, added this constraint in both fields
(not(${CT_SPI20}) or ${CT_SPI20} = 0) for field ${CT_SPI40}
(not(${CT_SPI40}) or ${CT_SPI40} = 0) for field ${CT_SPI20}
which I hope is correct and doesn't bite me in the end!
Thanks to you both for your response, which saved me from a headache. Have an excellent day!
Sincerely,
Christopher