You are viewing limited content. For full access, please sign in.

Question

Question

Possible Bug: Field rules in collection not working

asked on November 12

I have a field within a collection that I want to make required (or show/hide) based on one of the other fields within the collection. There is a drop-down to make a selection where one of the options is "Other" When other is selected I wanted to make a "Notes" field required. Or display it but otherwise hide it.

Neither field rule option is working. Is this a known issue? This is the modern designer in a self-hosted environment.

Forms version is 11.0.2311.50564 (update 5?)

0 0

Answer

SELECTED ANSWER
replied two days ago

We don't have plan to release Forms 11 official hotfix yet;

But there is a workaround for bug #535022: enable "Assign values to choices" (which will disable "Append choices to lookup results"), set the choice value same as the label for the predefined choice, then enable  "Append choices to lookup results" again.

Can you check if this could work for you?

0 0

Replies

replied on November 12

I tried configuring field rule like this and it worked as expected:

Can you show the field settings? Is there any other field rules?

Can you try configure in a new form and see if it works?

1 0
replied on November 13 Show version history

Thanks, Rui-

After testing a bit more, it appears to be tied to a data lookup. The dropdown is populated via lookup, but the "Other" value is already in the list and it's set to append looked up values to the list.

Interestingly, if I scroll down and set it to "Other" before filling in the seed values for the lookup--which are outside of the collection--it works at that point. And then after running the lookup there are 2 instances of "Other" in the list, with the top one triggering the field rule but the bottom one being ignored in the field rule logic.

Note that if I wait to set "Other" until after the lookup runs, I only see the bottom option that doesn't trigger the field rule. Additionally, this behavior of two "other" values can be seen when setting "other" as the default value.

 

 

So, it seems some combination of the list being populated from lookup, appending looked up values to the list, and the trigger for the list lookup being outside the collection.

 

0 0
replied on November 13

There is a known bug in 11 Update 5 (#535022) that "Field rules do not work if configured on a dropdown with a lookup rule and custom choice labels are appended to the lookup results". The bug has been fixed in Forms 12.

However in your case, when two labels are the same, they should just merge to one even with "Append choices to lookup results". This behavior should be there on 11 Update 5.

Can you show us your lookup rule settings?

And can you try with other lookup values?

0 0
replied on November 14 Show version history

Hi Rui-

Just to be clear, "other" is only coming from the static value in the list. It's not coming from the lookup. So there isn't anything to "merge"; it's like the append logic removes it and then puts it back and when it puts it back the field rule no longer respects it.

Also, you mention it is fixed in 12. Will it be fixed in 11? I won't be comfortable upgrading to 12 until it has been out for a while.

0 0
SELECTED ANSWER
replied two days ago

We don't have plan to release Forms 11 official hotfix yet;

But there is a workaround for bug #535022: enable "Assign values to choices" (which will disable "Append choices to lookup results"), set the choice value same as the label for the predefined choice, then enable  "Append choices to lookup results" again.

Can you check if this could work for you?

0 0
replied two days ago

Yes, that worked. Thank you! For what it's worth (if somebody else sees this): I checked the box for "Assign values", which defaulted to "Choice 1". So I replaced that with what was shown under label, "Other". Saved it, then re-checked the box to "Append choices to lookup results" and saved it again.

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.