cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

LOOKUP a value and bring information from a table

Hi! I made an app that gets info from a sharepoint list. I need to look up the value of the field "Jornada Laboral" in a table and bring the corresponding hours for each month. I first saved the table in OneDrive, the function worked fine for me but not for the people who doesn't have access to the file. Here is the formula I used 

LookUp(Tabla2;Horas=valorJornadaLaboral.Text;Concatenate("2.5";" h"))

To solve that problem, I used the excel connector and uploaded the table "Hours" which is the same table I had in OneDrive, I just renamed it to avoid confusions.

denise_martinca_1-1593028670796.png

 

I used this code 

LookUp(horas;Horas=valorJornadaLaboral.Text;Concatenate("2.5";" h"))

However,  I get this error

denise_martinca_0-1593028449567.png

I don't understand it since it says that the datatype is "Control" and it is invalid although the table is the same, I just bring from an static excel file.

Would you please help me? 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User III
Super User III

First all Try:

LookUp(horas;Horas=valorJornadaLaboral.Text;2.5))

Or

LookUp(horas;Horas=Value(valorJornadaLaboral.Text);2.5))

Or

LookUp(horas;Horas=Value(valorJornadaLaboral.Text);4))

Am wondering if you can rename the columns

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Helper II
Helper II

I managed to solve my problem with this code:

 

LookUp(horas;Horas=Value(valorJornadaLaboral.Text);'2.5')

 

I had to check all the data types both in my list and the input table of hours. Then I erased the concatenate part of the code since it kept failing. I also added two ' between the 2.5 which also made the function fail

Thank you all! 

View solution in original post

6 REPLIES 6
Super User III
Super User III

First all Try:

LookUp(horas;Horas=valorJornadaLaboral.Text;2.5))

Or

LookUp(horas;Horas=Value(valorJornadaLaboral.Text);2.5))

Or

LookUp(horas;Horas=Value(valorJornadaLaboral.Text);4))

Am wondering if you can rename the columns

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Continued Contributor
Continued Contributor

You're probably getting this warning (not error) because data types are lost between table transfer from OneDrive to Excel. Why don't you pull the data directly from SP List. Why even use OneDrive and Excel?

With the last two formulas I get an error, with the first one I get warning however, no results are shown in the screen. The warning says that the values compared in the formula are of different data types so they can´t be evaluated. 

I changed "Jornada Laboral" type to number (both in the list and in my form) but I still get the same message. I understand that the app detects the type of the field as text because of my formula...

denise_martinca_0-1593094137790.png

denise_martinca_1-1593094213039.png

 

 

 

denise_martinca_1-1593093058107.png

denise_martinca_2-1593093127751.png

 

 

If you look at the formulas, I wrapped it with VALUE, but you removed that.

Recheck the formula again

LookUp(horas;Horas=Value(valorJornadaLaboral.Text);2.5))

Or

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

I tried the 3 options, that formula gives this error

 

denise_martinca_3-1593096608104.png

denise_martinca_4-1593096644777.png

Than you for your help!

 

 

Helper II
Helper II

I managed to solve my problem with this code:

 

LookUp(horas;Horas=Value(valorJornadaLaboral.Text);'2.5')

 

I had to check all the data types both in my list and the input table of hours. Then I erased the concatenate part of the code since it kept failing. I also added two ' between the 2.5 which also made the function fail

Thank you all! 

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (6,537)