cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JMGCORNATOR
Level: Powered On

Converting a single record table into text

Hi there,

 

In my outlook i have a list of contacts containing names, id's, emailadresses etc.

 

My app has a screen on which i want to display the contacts along with their info in a gallery. The gallery is filtered by a searchbox. I have no problems importing the data to my gallery using the below:

If(
    IsBlank([@TextSearchBox4]);
    Office365Outlook.ContactGetItems("Contacts").value;
    Filter(
        Office365Outlook.ContactGetItems("Contacts").value;
        StartsWith(
            DisplayName;
            [@TextSearchBox4].Text
        )
    )
)

However, i have difficulties displaying the imported data. For an example, it will not let me display the email-adress of the contact. Having looked into this and tried saving the data in a collection, i can see that some columns, including the one containing email-adresses, store the values as tables. So i have got a table within a table.

 

 

Anmærkning 2019-11-07 155855.png

 

 

 

 

 

 

 

How do i convert these secondary tables to values or text?

 

Any suggestions?

 

J

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Converting a single record table into text

Hi @JMGCORNATOR 

You can use the Concat function to convert the EmailAddress child table to a single piece of text.

In your gallery, you can add a label and set the Text property to...

Concat( EmailAddresses, EmailAddress & ", " )

You'll need to substitute EmailAddresses with the correct column name (I can't see it in your screenshot as it's truncated), and you'll need to substitute EmailAddress with the column name of the EmailAddresses child table.

 

 

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Converting a single record table into text

Hi @JMGCORNATOR 

You can use the Concat function to convert the EmailAddress child table to a single piece of text.

In your gallery, you can add a label and set the Text property to...

Concat( EmailAddresses, EmailAddress & ", " )

You'll need to substitute EmailAddresses with the correct column name (I can't see it in your screenshot as it's truncated), and you'll need to substitute EmailAddress with the column name of the EmailAddresses child table.

 

 

View solution in original post

JMGCORNATOR
Level: Powered On

Re: Converting a single record table into text

@timl -Awesome, Just what i needed!

Quick question: What if i have a table containing a child table which also contains a childtable - so a child table within a child table? Can i still use concat()?

Super User
Super User

Re: Converting a single record table into text

Hi @JMGCORNATOR 

Glad that works! With a set of nested child tables, it becomes more difficult. You might need to loop through the table and child tables with the ForAll function, and to store the results into a collection.

One other option you could consider is to nest a gallery control within your gallery control. This way, you can avoid the use of Concat and it might be easier to use this approach with multiple nested child tables. With the gallery control, you can configure the items to expand horizontally rather than vertically, so this might look better in terms of appearance.

Highlighted
JMGCORNATOR
Level: Powered On

Re: Converting a single record table into text

@timl 

Thanks for the suggestion. 

 

I have been looking into i and unfortunately my skills isnt quite sufficient 😁 I have tried ForAll() combined with different setups of concat(), .text, .value and collect() but seems like its not possible for me to go deeper into the tables than the primary child table. 

 

 

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

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