mai-kel
Process Pupil

Issues with filtering of lookup values

Hi all,

 

I have a problem with the lookup formula using a dropdown field as filter.

I have two lists, a big main list and a supporting list.

 

This is the supporting list:

lookup1.PNG

 

This is (a part of) the new form for my main list:

lookup2.PNG

As you alread might have guested, I want the fields "Krankenhaus Kürzel" and "Krankenhaus Standort" to be auto-populated based on "Krankenhaus". Therefor I want to utilize the formula control:

lookup("Krankenhauser", "Title", Krankenhaus, "Kürzel")

 

But this is not working, because:

lookup3.PNG

I'll get back "1;#Klinik A" instead of "Klinik A" and therefor obviously no result.

How can I overcome this?

 

Cheers

mai-kel

 

PS: sorry for that poor question, I am pretty sure this has already been talked about a thousand times, but I am not able to find a fitting thread here?!?

 

 

 

 

 

0 Kudos
Reply
4 Replies
v-tmasenko
Design Canvas Artiste

Re: Issues with filtering of lookup values

Try applying the parseLookup runtime function.

For example,
parseLookup(lookup("Krankenhauser", "Title", Krankenhaus, "Kürzel"))
0 Kudos
Reply
kunalpatel
Automation Master
Automation Master
mai-kel
Process Pupil

Re: Issues with filtering of lookup values

I tried it, but it doesn't work. The point is the value you receive back.

 

lookup("Krankenhaeuser", "Titel", Krankenhaus, "Kürzel")

-> Krankenhaus gives back something like 1#;Klinik A

 

And that is the point - I need to get rid of the first part of this string:

1#;

2#;

...

 

If I exchange the column Krankenhaus against a fixed value everything is working fine:

lookup("Krankenhaeuser", "Titel", "Klinik A", "Kürzel") does the job.

If I extend this formula:

parselookup(lookup("Krankenhaeuser", "Titel", "Klinik A", "Kürzel") )

I'll receive #Value!

 

Doing the same with the columnname instead of a fixed value:

parselookup(lookup("Krankenhaeuser", "Titel", Krankenhaus, "Kürzel") )

I'll receive nothing, no return value!

0 Kudos
Reply
MegaJerk
Automation Master
Automation Master

Re: Issues with filtering of lookup values

The parseLookup is the right thing to use, but the example given on how to use it is incorrect. 

It should look like: 

lookup("Krankenhaeuser", "Titel", parseLookup(Krankenhaus,true), "Kürzel")

 

parseLookup({Control}, true) results in the Column Value being returned

parseLookup({Control}, false) results in the ID of the ROW being returned. 


give that a shot and we can see if it makes a difference. 

0 Kudos
Reply