Issues with filtering of lookup values

  • 24 October 2019
  • 4 replies
  • 15 views

Badge +10

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:

5066iF3AEC790DCA44359.png

 

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

5067iBA1AD02099CFE9B1.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:

5068i17C06219E3D2513F.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?!?

 

 

 

 

 


4 replies

Userlevel 3
Badge +9
Try applying the parseLookup runtime function.

For example,
parseLookup(lookup("Krankenhauser", "Title", Krankenhaus, "Kürzel"))
Badge +12

https://community.nintex.com/t5/Nintex-for-SharePoint/Cascading-dropdown-selections-not-always-working/m-p/102228/highlight/true#M70503

Badge +10

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!

Userlevel 5
Badge +14

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. 

Reply