Showing results for 
Search instead for 
Did you mean: 
Helper V
Helper V

Lookup Function

Good afternoon,

I have a lookup function:


                'TEAM MEMBER'.Value = Input_TeamMemberTarea.Selected.Value && FECHA = Input_FechaTarea.SelectedText.Value && SERVICIO.Value = Input_Servicio.Selected.Value


 'TEAM MEMBER', 'FECHA' and 'SERVICIO' are columns in TAREA list
but I have an error:

It says that both values are in a different type.

can you help me solve that?


Super User
Super User


Try Selected.Value instead of SelectedText.Value


Also, is FECHA a LookUp / Choice column? IF so, you need to use FECHA.Value

Hi @Eelman 

FECHA is a Date&Time column so I cannot put FECHA.Value


Well there is your issue. You are comparing Date to Text. Are you using a textinput to enter a date? If so, why not use a DatePicker? Solves a lot of issues.


However, if you insist on using a textinput wrap that in DateTimeValue()

I don't use DatePicker because I restrict only the dates where a week is selected. I created dates which has week (Single text value). In a dropdown I have those weeks and if I select one of them, then I have only 7 options to register.


I think is becuase as you said I am comparing Date to Text

I'm going to try to change it, thanks


I just tested it on my side and if you setup your 7 options in the format "mm/dd/yyyy" you can use this to convert and compare:

FECHA = DateValue(Input_FechaTerea.Selected.Value)


The Dropdown1 below has items (format = "mm/dd/yyyy"):


The label showing True/False has this code:



So you can see, it is comparing text to dates and showing True when they match so this should work in your situation.






First Picture:


This is my edit form and it appears the dates that corresponds to a week selected.

But If I create a record with the same Team member, Date (Fecha) and Service (Servicio), it allows me not to create that again.
that's why I put:

                'TEAM MEMBER'.Value = Input_TeamMemberTarea.Selected.Value && FECHA = Input_FechaTarea.SelectedText.Value && SERVICIO.Value = Input_Servicio.Selected.Value

The '=' icon gets me a warning message: 'Comparing values are not the same type'

When I click the save button I don't want this to happen: 
Same date.PNG

Just I don't want the app to allow me to save that record


Also I have this column (FECHA) type as Date&Fecha and I changed the DatePicker into a dropdown as you see in the first picture.
Only this that to Filter the dates with the column (You can read more about that situation:

the second message I wrote down below)


When I save the date it saves as a string type as you said. 

It only works well if I make FECHA column as Lookup column, and in the Items property shows 'Choices(TAREA.FECHA)


Inside your IsBlank, try this to get rid of the error

FECHA = DateValue(Input_FechaTarea.Selected.Value)

If this doesn't work, change your dropdown dates to "mm/dd/yyyy" they are currently "dd/mm/yyyy"

I use date forms as "dd/mm/yyyy", I'm in Latin America

Now it reads as a Date type but stills gets me an error

Ok, but you still haven't tried wrapping your 'date' in the function DateValue(). Please try that ie


... FECHA = DateValue(Input_FechaTarea.Selected.Value) ...



Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (71,926)