cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DAVIDPOWELL
Post Prodigy
Post Prodigy

create a Collection from a gallery but need specific columns

I have a gallery:

gallery_export_detail_records

 

I want to send to a "collection" on the press of a button:  clear and then add all records again.

 

i could use

ClearCollect(
colGallerytest,
gallery_export_detail_records.AllItems,
)

 

But i want to include only the fields below . Please.

 

 

 

 

my items:

{RBP_MASTER_ID:lbl_ID_25,
SKU:lbl_Sku_25,
RENEWAL_SKU: lbl_Renewal_Sku_24,
RENEWAL_OLVP_QUOTENUMBER: Label80_22,
PRODUCT_DESCRIPTION: lbl_Description_25,
QTY: lbl_Qty_25,
TARGET_PRICE: lbl_Target_Price_24,
TARGET_GP: lbl_Target_GP_20,
CURRENT_PRICE: lbl_Current_Price_24,
CURRENT_GP: lbl_Current_GP_2,
VENDOR_GUIDELINE_GP: lbl_VendorGuideline_GP_2,
APPROVED_PRICE: lbl_Approved_Price_2,
APPROVED_GP: lbl_Approved_gp_2,
SEND_TO_LEADER: lbl_send_to_leader_25
}

 

Thanks

Dave

1 ACCEPTED SOLUTION

Accepted Solutions
CNT
Community Champion
Community Champion

@DAVIDPOWELL The order doesn't matter because you can read or write any field in any order. Only the Column name is important.

 

Please remember to give a 👍 and accept the solution as it will help others in the future.

 

View solution in original post

4 REPLIES 4
CNT
Community Champion
Community Champion

@DAVIDPOWELL Try this,

ForAll(gallery_export_detail_records.AllItems,Collect(
	colGallerytest,
		{RBP_MASTER_ID:lbl_ID_25,
		SKU:lbl_Sku_25,
		RENEWAL_SKU: lbl_Renewal_Sku_24,
		RENEWAL_OLVP_QUOTENUMBER: Label80_22,
		PRODUCT_DESCRIPTION: lbl_Description_25,
		QTY: lbl_Qty_25,
		TARGET_PRICE: lbl_Target_Price_24,
		TARGET_GP: lbl_Target_GP_20,
		CURRENT_PRICE: lbl_Current_Price_24,
		CURRENT_GP: lbl_Current_GP_2,
		VENDOR_GUIDELINE_GP: lbl_VendorGuideline_GP_2,
		APPROVED_PRICE: lbl_Approved_Price_2,
		APPROVED_GP: lbl_Approved_gp_2,
		SEND_TO_LEADER: lbl_send_to_leader_25
		}
	)
)

@CNT 

The code created 

nested tables?

forall_example_nested.jpg

ok, i put the   .Text   behind all the column name and it worked. i.e.  

RBP_MASTER_ID:lbl_ID_25.Text

On last issue, it put the Column headers in alphabetical order ? 

 

Dave

CNT
Community Champion
Community Champion

@DAVIDPOWELL The order doesn't matter because you can read or write any field in any order. Only the Column name is important.

 

Please remember to give a 👍 and accept the solution as it will help others in the future.

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

Top Solution Authors
Top Kudoed Authors
Users online (4,349)