Hi Community,
I am developing a power app for the Approval of timesheet. My datasource here is a dynamic dataverse table. In my Power app, i am using a Multi-selection table for selecting and viewing the Time entries, When I click any records and click the button to Approve, it is taking those Time Entries to the Excel Sheet.
The issue I am facing here is I have defined a collection for the Selected items in the table and also I am defining another collection which has other columns as well to be added in the Excel sheet( since I am showing only few columns in the table in power app, I want to show other columns as well in my excel sheet, So I am using another collection to show those columns). Here, in the second collection, it is not showing any data for me. I also have Unique column for Identification as well in dataverse table, still the collection is not showing data. How to resolve this?
The query I used is below:
UpdateIf(
'Sweden_News',
ThisRecord.'RecId' in Table2.SelectedItems.RecId,
{
ApprovalStatus: "Approved",
ApprovalDate: Today()
}
);
// Initializing collection for passing the selected entries
ClearCollect(
SelectedEntries,
Table2.SelectedItems
);
//for loop with selected entries and refer Sweden New table for other columns
ClearCollect(
CollectionWithAllRequiredColumns,
ShowColumns(
Filter(
'Sweden_News',
'RecId' in Table2.SelectedItems.RecId
),
EmployeeName,
EmployeeKey,
ProjectName,
CostCenterProject,
ProjTransDate,
'Week',
Hours,
HoursAbsence,
HoursDirect,
HoursIndirect,
PayRollExpenseCode,
ApprovalDate
)
);
// Pass Collection to flow
ExportExcel.Run(
JSON(
CollectionWithAllRequiredColumns,
JSONFormat.IgnoreUnsupportedTypes
),
User().Email
);