
I am working on creating an editable gallery in my app. The gallery items can either be items from a collection or a SharePoint list, depending on the mode of the gallery. The mode of the gallery is set by a variable (varGalEmployeesMode) which is determined by the Mode of the EditForm on the same screen.
OnVisible of the screen I create the schema of the collection and then clear its contents. This schema matches the schema of the SharePoint list:
If varGalEmployeeMode = "New", then the items of the gallery should be the colUpdateEmployees_1, otherwise the items should be from the SharePoint list quantity_CraftDispatchRequest.
The current value of varGalEmployeeMode is equal to "New"
The collection element of the formula shows all columns in colUpdateEmployees_1
The SharePoint list element shows all columns of the SharePoint list
The Problem
The formula only results in showing 4 columns from the collection.
Why is this formula not returning all columns from my collection?
Hi @McCHubie ,
Here's how you might set up your OnVisible property of the screen to initialize the collection:
ClearCollect(colUpdateEmployees_1, {
ID: 1,
Column1: "",
Column2: "",
Column3: "",
//... include all other columns you need initialized
});Then, for the gallery's Items property, you can switch between the collection and the SharePoint list using your mode variable:
If(varGalEmployeesMode = "New", colUpdateEmployees_1, quantity_CraftDispatchRequest)If this solution resolves your issue, please consider marking it as accepted. ✅
Warm regards,
Muhammad Ali