Select to view content in your preferred language

Not relevant fields are still getting values in 3.12

660
2
Jump to solution
03-10-2021 11:10 AM
DougBrowning
MVP Esteemed Contributor

I have a field that inherits from another field.  Both have relevants on them.  The form is hiding the relevant field from display but it is still getting a value.  This puts the value in my second field.  But it should be "".

Field is not relevant from display

DougBrowning_0-1615402952256.png

But it is getting a value somehow

DougBrowning_1-1615402985282.png

 

DougBrowning_3-1615403008778.png

Field is text and read only.  This is the relevant and the calc that still fires.

contains(${TopCanopyDefault}, "XXXX") 

concat(substr(${TopCanopyDefault},0,string-length(${TopCanopyDefault})-4), "_", ${CollectionNumberTopDefault})

The field that is getting this value also has a relevant contains(${TopCanopy}, "XXXX").  With a calc of if(${UseDefaults}='Yes' and ${UnknownCodeTopDefault} != '',${UnknownCodeTopDefault},if(contains(${TopCanopy}, "XXXX"),concat(substr(${TopCanopy},0,string-length(${TopCanopy})-4), "_", ${CollectionNumberTop}),''))

Note i even have a != "" in there and still gets a value.

So somehow a non relevant field is still calculating and it is adding its value into a second field that is also not relevant. Then join picks it up.  Weird.

This does not seem to happen in our other forms that are published under 3.11.

Anyone seen this?  Sorry it is hard to explain

thanks

0 Kudos
1 Solution

Accepted Solutions
ZacharySutherby
Esri Regular Contributor

Hello @DougBrowning

Thank you for reporting this! I've gone ahead and logged an issue in our database for the behavior. From my testing the behavior seemed specific to Note question types. If I switched the relevant note question to a calculate question the behavior was no longer reproducible. 

Another workaround would be to double up on the relevant statement in the calculation. For example if(selected(${s1}, 'yes'), 1,0), this will also prevent the calculation from returning a value. 

Thank you, 

Zach

Thank you,
Zach

View solution in original post

2 Replies
DougBrowning
MVP Esteemed Contributor

Created a simple form today that shows this as well.  If you inherit a value from a non relevant field that also has a calc to a relevant field it seems to get the value passed through.  A non relevant field should be "" always right?  It seems to follow the chain all the way to the original field.

See this form and how a non relevant field is somehow passing through to a relevant field.  I thought it was due to a repeat but it happens outside as well.

Thanks

0 Kudos
ZacharySutherby
Esri Regular Contributor

Hello @DougBrowning

Thank you for reporting this! I've gone ahead and logged an issue in our database for the behavior. From my testing the behavior seemed specific to Note question types. If I switched the relevant note question to a calculate question the behavior was no longer reproducible. 

Another workaround would be to double up on the relevant statement in the calculation. For example if(selected(${s1}, 'yes'), 1,0), this will also prevent the calculation from returning a value. 

Thank you, 

Zach

Thank you,
Zach