10 Replies Latest reply: Apr 19, 2016 5:01 AM by Hans Müller

# Comparison of two fields

Hi,

I have two different fields which are completely independent. When I click in field one at the value 'A' there should be a field function which excludes the value 'A' in field Two. Another example when I click in the field One on the value B and C, in field Two there must selected everything.

How can i achive that?

• ###### Re: Comparison of two fields

In general, using field event trigger and selection - select in field actions (go to Settings - Document properties - Triggers).

Your logic is not really clear, could you elaborate on this?

• ###### Re: Comparison of two fields

When I choose in field One a Value which is also in field Two,then this value must be excluded in field Two.

One Selection: A      Two: D,E

One Selection: C      Two: A,D,E

One Selection: B,C   Two: A,D,E

Do you understand what I mean?

• ###### Re: Comparison of two fields

May be like this:

=If(GetSelectedCount(One) > 0, '(' & Concat(DISTINCT {<Two -= P(One)>} Two, '|') & ')')

• ###### Re: Comparison of two fields

Maybe

=If(GetSelectedCount(One) > 0, '(' & Concat(DISTINCT {1<Two -= P(One)>} Two, '|') & ')')

• ###### Re: Comparison of two fields

Very nice

• ###### Re: Comparison of two fields

Thank you all for the fast answer! Awesome!

• ###### Re: Comparison of two fields

Okay try following....

1. Select in field One A, you will become the right result

2. Then select in field One B and C and you will see that in field Two the result is only D and E, but normally we must have A,D,E because A in field One is not selectexd

• ###### Re: Comparison of two fields

I think Stefan was able to fix that issue. Check out his response

• ###### Re: Comparison of two fields

Hi Hans,

If I am not wrong, then you want as below :

If you select A from One then it should exclude A from Two and rest field should get select (D,E)

If you select C from One then A,D,E should get selected .....and like this

??

Regards,

Mahamed

• ###### Re: Comparison of two fields

Exactly!