cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

"Cannot use this record. It may contain colliding fields of incompatible types."

Hello, 

 

  • I'm building a telemetry "drop-in" that collects Username/email/lat/long/etc. 
  • This drop-in is in the form of a Gallery. 
  • The Gallery's items are created using what I call, Mehdi's Method of creating a collection

 

Here is the OnVisible code: 

Set(
    telemetry,
        Table(
            {header: "User Info"},
            {item: User().FullName},
            {item: Office365Users.UserProfile(User().Email).MailNickname},
            {item: Office365Users.UserProfile(User().Email).JobTitle},
            {item: Office365Users.UserProfile(User().Email).Mail},
            {header: "User Location Info"},
            {item: varLat},
            {item: varLong},
            {item: varAlt},
            {header: "User Manager"},
            {item: Office365Users.Manager(User().Email).DisplayName},
            {item: Office365Users.Manager(User().Email).Mail}
        )
)

Then the Text Property of the single label in the telemetry Gallery reads: 

If(
    IsBlank(ThisItem.header),
    ThisItem.item,
    ThisItem.header
)

The var's Lat/Long/Alt are all instantiated OnStart using Set(varLat, Location.Latitude), etc. 

 

For some reason, vars Lat/Long/Alt are giving me the error: "Cannot use this record. It may contain colliding fields of incompatible types."

 

While this is an amazing error so profess ( 🙂 ), what does it mean? 

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: "Cannot use this record. It may contain colliding fields of incompatible types."

Hi @ericonline

 

I think the issue here is that the properties that you retrieve from the Office365Users data source are text, whereas your long/lat/alt values are numeric. It's this mismatch in data types that causes the 'colliding fields of incompatible types'.  Perhaps you can solve this problem by converting the long/lat/alt values to text like so?

 

Set(
    telemetry,
        Table(
            {header: "User Info"},
            {item: User().FullName},
            {item: Office365Users.UserProfile(User().Email).MailNickname},
            {item: Office365Users.UserProfile(User().Email).JobTitle},
            {item: Office365Users.UserProfile(User().Email).Mail},
            {header: "User Location Info"},
            {item: Text(varLat)},
            {item: Text(varLong)},
            {item: Text(varAlt)},
            {header: "User Manager"},
            {item: Office365Users.Manager(User().Email).DisplayName},
            {item: Office365Users.Manager(User().Email).Mail}
        )
)

 

View solution in original post

4 REPLIES 4
Power Apps Staff LanceDelano
Power Apps Staff

Re: "Cannot use this record. It may contain colliding fields of incompatible types."

@lesaltzm Can you help here?

Super User
Super User

Re: "Cannot use this record. It may contain colliding fields of incompatible types."

Hi @ericonline

 

I think the issue here is that the properties that you retrieve from the Office365Users data source are text, whereas your long/lat/alt values are numeric. It's this mismatch in data types that causes the 'colliding fields of incompatible types'.  Perhaps you can solve this problem by converting the long/lat/alt values to text like so?

 

Set(
    telemetry,
        Table(
            {header: "User Info"},
            {item: User().FullName},
            {item: Office365Users.UserProfile(User().Email).MailNickname},
            {item: Office365Users.UserProfile(User().Email).JobTitle},
            {item: Office365Users.UserProfile(User().Email).Mail},
            {header: "User Location Info"},
            {item: Text(varLat)},
            {item: Text(varLong)},
            {item: Text(varAlt)},
            {header: "User Manager"},
            {item: Office365Users.Manager(User().Email).DisplayName},
            {item: Office365Users.Manager(User().Email).Mail}
        )
)

 

View solution in original post

Super User
Super User

Re: "Cannot use this record. It may contain colliding fields of incompatible types."

"We got a winnnaaaa" ding ding ding!

 

Nice @timl! You nailed it. It works great. 

 

Thank you!

Super User
Super User

Re: "Cannot use this record. It may contain colliding fields of incompatible types."

Thanks @ericonline, I'm glad this solved your problem.

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,143)