@DbLookup?

Hi

I am looking for a solutions to get a field by using 2 keywords.

ex.

I have a view, 1 column by username, 2 column by a nummer

I would like to get the value of the 3 column but the command has first look for the username, then for nummer then get the 3 column or field.

With @DbLookup its only possilbe to use 1 keyword which must be in the second column.

Is there another way to do that?

Regards

Mark

Subject: @DbLookup ?

Hi,

I’d create another view. The first column concatentates the two values, so you have-

Andrew~1

John~2

etc.

Now you can lookup based on both values. I know it’s not great practice to create another view just for a lookup value, but it’s the only way I can see to do this.

HTH

Andrew.

Subject: @DbLookup → Pass key as a list

Hello,

You can pass key in @Dblookup as a list. see example below

list:=“A”:“R”;

@DbLookup(“”:“NoCache”;“”;“Copy of catNames”;list;“Name”)

This will fetch the values. just make sure that both your columns are sorted.

Hope this serves your purpose.

Best Regards,

Munish Kaushik

Subject: RE: @DbLookup → Pass key as a list

You can pass a list in @dblookup, but it doesn’t use the list to match against succesive columns in a view (like getDocumentByKey does.)

If you pass a list, @dblookup returns values where any value in the list matches a value in the first sorted column of the view.

e.g. if I have a view called foo where the first 2 columns are sorted and has the following entries

1 | a | 1a

1 | b | 1b

1 | c | 1c

1 | d | 1d

2 | a | 2a

2 | b | 2b

2 | c | 2c

2 | d | 2d

and call @dblookup(“”;“”;“foo”;“1”:“c”;3) I will get back “1a”:“1d”:“1c”:“1b”.

If I call @dblookup(“”;“”;“foo”;“1”:“2”;3) I will get back “1a”:“1d”:“1c”:“1b”:“2a”:“2d”:“2c”:“2b”

Subject: RE: @DbLookup → Pass key as a list

Many thxs!!! I will try all solutions u gave me!

Greetings from a sunny Switzerland!

Subject: RE: @DbLookup ?

You can do it by “GetDocumentByKey” method in script.