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

Incompatible type of comparison: Table, Text

Hi Everyone,

I am trying a simple formula but getting this error:

Incompatible type of comparison: Table, Text

If(User_MuhammadTesting.Role = "Manager", Location_Test)

I also tried this:

If(Text(User_MuhammadTesting.Role) = "Manager", Location_Test)

&

If(User_MuhammadTesting.Role.Value = "Manager", Location_Test)

Kindly let me know where i am making the mistake. And what will be the correct formula.

My share point list is: User_MuhammadTesting and column name is: Role

1 ACCEPTED SOLUTION

Accepted Solutions
Sunil-Narnaware
Solution Supplier
Solution Supplier

@Muhammad07 

You are looking a record whose role is manager.. and if you get the record you want to use Location_Test..

In order to find the record you have to do searching by following way..

 

If(
    IsEmpty(
        LookUp(
            User_MuhammadTesting,
            Role = "Manager"
        )
    ),
    Location_Test
)

 


===============

If this helps in solving your problem, 'Accept is as Solution'. If you like, hit 👍

View solution in original post

6 REPLIES 6
Sunil-Narnaware
Solution Supplier
Solution Supplier

@Muhammad07 what is column type for 'Role'?

Muhammad07
Helper I
Helper I

@Sunil-Narnaware its "Single line of Text" type

Sunil-Narnaware
Solution Supplier
Solution Supplier

@Muhammad07 

You are looking a record whose role is manager.. and if you get the record you want to use Location_Test..

In order to find the record you have to do searching by following way..

 

If(
    IsEmpty(
        LookUp(
            User_MuhammadTesting,
            Role = "Manager"
        )
    ),
    Location_Test
)

 


===============

If this helps in solving your problem, 'Accept is as Solution'. If you like, hit 👍

Muhammad07
Helper I
Helper I

@Sunil-Narnaware I have one more question, what if i want to check role with current user email:

My List(User_MuhammadTesting) has following columns : Email, Role, location

I want to verify current user email with email into User_MuhammadTesting.Email and then role with "manager".

Sunil-Narnaware
Solution Supplier
Solution Supplier

just add && Email = User().Email against role comparison in above code.. so it will compare both email & role 

Muhammad07
Helper I
Helper I

@Sunil-Narnaware Thank you for your help. But the problem rn is I want to showup Location_Test in my combo box but in this formula its getting the USERTesting list data. Should not it be Location data?

 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,468)