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

Question

Question

How can I create a lookup table from 2 fields separately?

asked on January 3, 2019

Hi all,

I have 2 fields (#COPIEUR and CLIENT).

The user should make a lookup table by filling the first field or the second field.

Let's me explain.

For example, if he's writing "1783" in the first field, the client will be "PAROISSE SAINT PAUL MAHINA"

 

but if he's writing "PAROISSE SAINT PAUL MAHINA" in the second field, the # COPIEUR should be "1783".

 

I tried to make a lookup table for each one but it doesn't work (please, see the video).

 

 

How can I do?

 

Thanks in advance for your help.

Regards

2019-01-03_1122.swf (330.15 KB)
0 0

Replies

replied on January 3, 2019 Show version history

There's no simple way to do what you're asking because it creates a circular reference.

If Field A has a lookup for Field B, and Field B has a lookup for Field A, it would create a never-ending cycle of updates because lookup results trigger lookups just like user input.

For Example,

  • Field A is entered
  • Field A lookup is triggered
  • Field B is populated
  • Field B lookup is triggered
  • Field A is populated
  • Field A lookup is triggered
  • and so on...

 

The lookups have to trigger other lookups because sometimes you might have a series of lookups like Field A populates Field B, then Field B populates Field C, etc.

There's a lot of complicated things you could try, but at the end of the day it is not good to have a circular reference like this.

Your best option would probably be adding additional hidden fields for the lookups so you can prevent the user inputs from referencing each other directly, then go from there with functions or JavaScript.

 

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

Sign in to reply to this post.