cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HerbAuster
Advocate II
Advocate II

Array from a text file

Hi *,

unfortunately, I must try again to get around a Power Automate bug.

I would like to realize the following sequence:

A flow is started from a PowerApps Gallery. The flow receives the ID of the selected entry from the gallery as a transfer parameter and reads out some values for this ID and then writes them to an Excel file or CSV file.

I noticed that German words with umlauts (ü like München) are not written correctly into the file. There is also no possibility to specify UTF-8 as format.

When I look at the output of the Compose command, the special characters are still displayed correctly. Only when I write the output to an xls, xlsx or csv file, they are no longer displayed correctly.

Therefore, I write now everything into a simple text file, here the problem with the special characters does not arise. Now I try to read this text file again via flow and build an array from it.

The content of the text file now looks like this:

SharePoint list headings:

StatusTitelKundeGenehmigerReisetageReisemittelUnterkunftSonstiges

Values of the SharePoint list, if available:

OffenMeeting in MünchenKunde 2Lennon John----

 

Now I want to create an array with this data, which I want to write back to the SharePoint list later.

So far, I have gotten this far:

Using two Compose actions, I split the entire contents of the text file into two lines and then write that to two variables (varFirstLine and varSecondLine):

Bild1.png

Verfassen = uriComponentToString(split(uriComponent(variables('varFileContent')), '%0A')[0])

Verfassen2 = uriComponentToString(split(uriComponent(variables('varFileContent')), '%0A')[1])

 

With two more Compose commands I now get two arrays:

split(variables('varFirstLine'), ',')
split(variables('varSecondLine'), ',')

 

Now my knowledge stops 🤔

How do I get a compilation of the data from these two arrays as shown here ?

{
	"Status":"Offen",
	"Titel":"IT-Messe in München",
	"Kunde":"Test Kunde 2",
	"Genehmiger":"Lennon John",
	"Reisetage":"",
	"Reisemittel":"",
	"Unterkunft":"",
	"Sonstiges":""
}

 

I am grateful for any tips.

 

Regards

Herb

 

1 ACCEPTED SOLUTION

Accepted Solutions
Paulie78
Super User III
Super User III

5 REPLIES 5
HerbAuster
Advocate II
Advocate II

Hi *,

has really nobody here a tip, how I could get further here ?
It would be nice if someone could help me.
Thank you very much.

 

Regards

Herb

VictorIvanidze
Memorable Member
Memorable Member
Paulie78
Super User III
Super User III

Hi Paulie,

you have made my day.
This is exactly the solution I was looking for.
Also, your video immediately showed me the solution to a follow-up problem.
Thank you so much for this valuable input.

 

Regards

Herb

Paulie78
Super User III
Super User III

@HerbAuster really pleased you found the video helpful! 😍

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,432)