ForAll(
questionsCollection,
Patch(
'Survey Answers',
{
Question: ,
Wave: labelHiddenWave.Text,
'Key Process': labelHiddenKeyProcess.Text,
'Group Category': labelHiddenGroupName.Text,
'Customer Id': labelHiddenCustomerId.Text,
'Question Id': labelSurveyQuestionNumber.Text,
Responsible: Text(radioSurveyResponsible.SelectedText.Value),
SurveyStatus: Text(radioSurveyStatus.SelectedText.Value),
Name: Concatenate(
Text(comboBoxCustomer.Selected.'Customer Id'),
"-",
Text(comboBoxTimePeriod.Selected.Name)
),
'Unique Question Identifier': labelSurveyQuestionUniqueIdentifier.Text
}
)
);
Above is the code where questionsColelction contains all data, now needs to access values from questionsCollection and have to save it in Survey Answers
Hi @anubhav29
If I understand correctly, you have a collection of new data that you want to add to a target datasource. If this is the case, you can simply use the Collect function to merge the collection with the datasource.
Collect(TargetDataSource,SourceCollection)
The source collection will need to have the exact same column names as the datasource it is to be merged with. However, the order of the columns does not need to be the identical. This can be accomplished by reshaping the collection using the AddColumns(), DropColumns(), RenameColumns() and ShowColumns() functions https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping on the collection until it exactly matches the target datasource.
User | Count |
---|---|
25 | |
21 | |
6 | |
6 | |
5 |
User | Count |
---|---|
28 | |
25 | |
10 | |
8 | |
6 |