web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Header Sequence - Canv...
Power Apps
Unanswered

Header Sequence - Canvas App

(0) ShareShare
ReportReport
Posted on by 538

Team,

I am trying to realign the header in desired format but i could not, Formula follows,

Test1.Run(User().Email, 
 JSON(With(
 {TheTable: 
	 ShowColumns(
			AddColumns(
			 GroupBy(
				Filter(
					ShowColumns(
					 Dailyinventory, "crf99_sno", "crf99_materialdesc", 
					 "crf99_materialno", "createdon", 
					 "crf99_bbd", "crf99_qty"
					), 
					DateDiff(createdon,Today(),Days) = 0
				), "crf99_materialdesc", "NewGroup"
			 ), 
			 "Materialno", 
			 First(NewGroup).crf99_materialno, 
			 "Qty", 
			 Sum(NewGroup, crf99_qty), 
			 "Created On", 
			 Last(NewGroup).createdon, 
			 "bbd", 
			 Last(NewGroup).crf99_bbd, 
			 "Sap-Stock", 
			 LookUp(
				sapstock, 
				material = First(NewGroup).crf99_materialno, 
				unrestrictedStock
			 )
			), 
 "Materialno",
 "crf99_materialdesc", 
 "Qty", 
			"Sap-Stock",
			"Created On", 
			"bbd"
				
		)
	 },
 
	 ForAll(Sequence(CountRows(TheTable)), Patch(Last(FirstN(TheTable, Value)),{Sno : Value}))
 )
 )
)

 

Current result, 

AVTS_0-1622905194772.png

 

Expected

AVTS_1-1622905264642.png

 

Can you help me with expected format

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,657 Most Valuable Professional on at

    What kind of control are you displaying the records in?  A data table or a gallery?  The order of the columns in those is controlled by the layout of the fields in the control, not the order in the data source.

  • AVTS Profile Picture
    538 on at

    The formula is attached in to the button click , layout is similar to Data Table .

  • Pstork1 Profile Picture
    69,657 Most Valuable Professional on at

    I understand that the formula runs on a button click.  But how are the results displayed?  The display controls are normally how you specify the layout.

  • AVTS Profile Picture
    538 on at

    Button click trigger the flow with csv attachement to email. Current layout is mentioned in the main topic

  • Pstork1 Profile Picture
    69,657 Most Valuable Professional on at

    Can you provide screenshots of the flow?  You should be able to use the Data Select Command to re-order the columns prior to creating the CSV.

  • AVTS Profile Picture
    538 on at

    Sure, Attached.

    AVTS_0-1622921265681.pngAVTS_1-1622921294489.png

     

  • Pstork1 Profile Picture
    69,657 Most Valuable Professional on at

    The easiest way to control the labels and order of the headers in the CSV would be to change the Columns dropdown in the Create CSV action from Automatic to Custom.  Once you do that you can specify the headers you want in order and the values from the array that you want in each column.

    image.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard