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

Differentiate between Columns and Tables with same name

I'm having issues with Column names and Table names. My formulas are assuming I'm using one when I want to use the other.

Is there a quick fix for this.

 

This is mostly relevant for Lookup tables, since on the parent side the dot notation allows for a "reverse lookup" property that has the same name as the table.

 

To give and example of this issue. I'm trying to Create a new item of Parent, and then some children.

 

Patch('Parent Table', Defaults('Parent Table');
Patch('Child Table', Defaults('Child Table);

Here I get the error A one to many ... is being reference in this functions record scope. I'm assuming this is because the functions assumes I'm meaning 'Child Table' the property of 'Parent Table' not the table itself.

 

1 ACCEPTED SOLUTION

Accepted Solutions
iAm_ManCat
Super User
Super User

You can use the disambiguation operator to clarify which you are referring to:

Operators and Identifiers in Power Apps - Power Apps | Microsoft Docs

 

Like this:

Patch([@Parent Table], Defaults([@Parent Table], { RECORDS_GO_HERE });
Patch([@Child Table],  Defaults([@Child Table],  { RECORDS_GO_HERE });

 

And lets say you have a column in your child table called parent table, you would refer to it like this:

'Child Table'[@'Parent Table']

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

1 REPLY 1
iAm_ManCat
Super User
Super User

You can use the disambiguation operator to clarify which you are referring to:

Operators and Identifiers in Power Apps - Power Apps | Microsoft Docs

 

Like this:

Patch([@Parent Table], Defaults([@Parent Table], { RECORDS_GO_HERE });
Patch([@Child Table],  Defaults([@Child Table],  { RECORDS_GO_HERE });

 

And lets say you have a column in your child table called parent table, you would refer to it like this:

'Child Table'[@'Parent Table']

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (4,652)