This code creates a Collection from a Gallery.
However, the Collection keeps putting the Columns in Alphabetical order ?
I need the Collection in this order ?
Thanks
David
Clear(colGallerytest)
;
ForAll(gallery_export_detail_records.AllItems,Collect(
colGallerytest,
{RBP_MASTER_ID:lbl_ID_25.Text,
SKU:lbl_Sku_25.Text,
RENEWAL_SKU: lbl_Renewal_Sku_24.Text,
RENEWAL_OLVP_QUOTENUMBER: Label80_22.Text,
PRODUCT_DESCRIPTION: lbl_Description_25.Text,
QTY: lbl_Qty_25.Text,
TARGET_PRICE: lbl_Target_Price_24.Text,
TARGET_GP: lbl_Target_GP_20.Text,
CURRENT_PRICE: lbl_Current_Price_24.Text,
CURRENT_GP: lbl_Current_GP_2.Text,
VENDOR_GUIDELINE_GP: lbl_VendorGuideline_GP_2.Text,
APPROVED_PRICE: lbl_Approved_Price_2.Text,
APPROVED_GP: lbl_Approved_gp_2.Text,
SEND_TO_LEADER: lbl_send_to_leader_25.Text
}
)
)
;
Solved! Go to Solution.
It would have been good to include that in your original post. You can do the same thing with Concat() in Power Apps, with the fields in order separated by a comma and Char(10) at the end, then send that as the csv content.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @DAVIDPOWELL ,
You did not say what order, but you would do this
ForAll(
Sort(
gallery_export_detail_records.AllItems,
YourSortField
),
Collect(
colGallerytest,
...
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Warren,
Not wanting to sort.. Wanting the fields in the collection the same order i have them here.
Column1 = RBP_MASTER_ID:lbl_ID_25.Text,
Column2 = SKU:lbl_Sku_25.Text,
Column3 = RENEWAL_SKU: lbl_Renewal_Sku_24.Text,
etc...
The Collection code puts these Columns in alphabetical order....?
Column1 = APPROVED_GP: lbl_Approved_gp_2.Text,
Column2 = APPROVED_PRICE: lbl_Approved_Price_2.Text,
Column3 = CURRENT_GP: lbl_Current_GP_2.Text,
Column4 = CURRENT_PRICE: lbl_Current_Price_24.Text,
Thanks
Dave
Hi @DAVIDPOWELL ,
I never actually thought of that before, but all collections are in alphabetical order when viewed in View > Collections. There are no settings that would change this - why do you want to do this?
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
because i'm trying to run a Flow to export the data out of the Collection to a csv file or excel...
and i want the export in a specific order.
ok, i figured it out in flow.
this was the expression for bringing in a field..
item()?['rbp_master_id']
It would have been good to include that in your original post. You can do the same thing with Concat() in Power Apps, with the fields in order separated by a comma and Char(10) at the end, then send that as the csv content.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @DAVIDPOWELL ,
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
hi @WarrenBelz
Could you explain the concat() function to order collection columns ? don't found the good syntax.
Thx
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.
User | Count |
---|---|
206 | |
97 | |
60 | |
51 | |
45 |
User | Count |
---|---|
258 | |
158 | |
85 | |
79 | |
58 |