web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Running flow inside ne...
Power Apps
Unanswered

Running flow inside nested ForAll

(0) ShareShare
ReportReport
Posted on by 51

Hi, this is driving me up the wall. I am trying to save data from a form to an SQL table.

However, the complication is that the user is able to select multiple items from cmbAssignedGroups and cmbAssignedRoles comboboxes, and I need a unique row per selection.

I tried to do this by passing a JSON to SQL Server, but that failed. So now I am trying to cycle through the selections and run the flow multiple times, passing the 12 parameters to the SP.

 

But, I'm getting:

"Invalid number of arguments. Recieved 12. Expected 2.

"Expected operator. We expect an operator such as +, *, or & at this point in the formula"

"Unexpected characters. The formula contains 'CurlyClose' where 'Run' is expected.   

 

ForAll(cmbAssignedGroups_AS.SelectedItems,
 ForAll(cmbAssignedRoles_AS.SelectedItems,
 {
 flowAssignOrEditSurveyAssignments.Run(
 drpAccessibleByStaffID_AS.SelectedText.Result,
 DateTimeValue(Date(Year(Now()), 12, 31) & " " & TimeValue("00:00")),
 gblCurrentUserID,
 _asGrp.GroupCode,
 _asRol.Value,
 If(!IsBlank(locExistingAssignedSurvey), locExistingAssignedSurvey.AssignedSurveyID, Blank()), 
 DateTimeValue(Date(Year(Now()), 12, 31) & " " & TimeValue("00:00")),
 Now(), 
 Switch(togRecurringFlag_AS.Value, true, 1, false, 0),
 Concat(galSurveyParameters_AS.AllItems, Concatenate("'",lblSurveyParameter_AS.Text, "'=", drpSurveyParameterResponse_AS.Selected.OptionText), ";"),
 drpSurveyType_AS.Selected.SurveyTypeID
 )
 }
 )
);

 

Thank you,

Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard