cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lewkir
Resolver I
Resolver I

Did I create a table nested in another table?

So a bit of exposition is required:

 

I have a single column table, TimesNoFormat, which is nested in a gallery (for reasons I'm not sure are relevent to the question so I'll leave them out).

 

What I'm trying to do is concatenate the values in this table with a value from a row in the gallery. 

 

Eg. The table items in row one in the gallery will go from 0015, 0030.... to M0015, M0030.

 

In the Items property of the table I have used:

 

AddColumns(
    TimesNoFormat,
    "RoomNumber",
    Concatenate(
        ThisItem.Title,
        TimesNoFormat.'New Times'
    )
)

Which is not throwing any errors.

 

However, when I try to display the items in the new column as text on a button I get the error:

 

"The property expects Text values, but this rule produces incompatable table values"

 

I've tired ThisItem.RoomNumber but it's still not having it.

 

Is it saying that the item in the table is a table itself?

 

I'm struggling to fathom what exactly is wrong.

 

Hopefully that is enough info for somone to assist but feel free to ask for more.

 

Cheers,

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Lewkir
Resolver I
Resolver I

Solved it b removing "ThisItem" and the table name:

 

AddColumns(
    TimesNoFormat,
    "RoomNumber",
    Concatenate(Title,'New Times')        
)

 

No idea why it worked but it does.

View solution in original post

CarlosFigueira
Power Apps
Power Apps

Within an AddColumns call for the table TimesNoFormat, all members of that table are in scope - so if you want to access the 'New Times' property, you can do it directly. When you specified "TimesNoFormat.'New Times'" as an argument of the Concatenate function, then you went you went out of the record scope and back to the "global scope", retrieving a table with all values for the 'New Times' property of TimesNoFormat. If you change your expression to this:

AddColumns(
    TimesNoFormat,
    "RoomNumber",
    Concatenate(
        ThisItem.Title,
        'New Times'
    )
)

I believe you should get the result you want.

Hope this helps!

View solution in original post

3 REPLIES 3
Lewkir
Resolver I
Resolver I

Solved it b removing "ThisItem" and the table name:

 

AddColumns(
    TimesNoFormat,
    "RoomNumber",
    Concatenate(Title,'New Times')        
)

 

No idea why it worked but it does.

View solution in original post

CarlosFigueira
Power Apps
Power Apps

Within an AddColumns call for the table TimesNoFormat, all members of that table are in scope - so if you want to access the 'New Times' property, you can do it directly. When you specified "TimesNoFormat.'New Times'" as an argument of the Concatenate function, then you went you went out of the record scope and back to the "global scope", retrieving a table with all values for the 'New Times' property of TimesNoFormat. If you change your expression to this:

AddColumns(
    TimesNoFormat,
    "RoomNumber",
    Concatenate(
        ThisItem.Title,
        'New Times'
    )
)

I believe you should get the result you want.

Hope this helps!

View solution in original post

Thanks Carlos.

 

I worked it out a mere 3 minutes before you answered but as you also explained why it worked I'll give you the accepted solution. 

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (3,705)