Please see attached screenshot for error. Any suggestions?
My solution code:
Clear(D1_CollItems_Edit);
Set(D1_ItemsString_Edit, Left(D1_ItemsString_Edit, Len(D1_ItemsString_Edit)-1));
ForAll(Split('D1 - Team Identification', "|"),
Collect(D1_CollItems_Edit,
{
D1_FullName_D1_Edit: Text(Last(FirstN(Split(Result,";").Result,1).Result).Result),
D1_Role_D1_Edit:Text(Last(FirstN(Split(Result,";").Result,2).Result).Result)
}));
I'm trying to implement this: https://www.c-sharpcorner.com/blogs/concat-and-forall-in-powerapps
Am I setting this up incorrectly? The gallery name is shown in the nav tree. (See screenshot)
@Anonymous
Always something lurking about! Good deal, continue on.
D1_Team_Identification and 'D1 - Team Identification' are two different things. I just discovered there was a list created. That was the issue! Ok trying again.
@Anonymous
PowerApps will not rename a column except to either accommodate special characters or to reflect real names. So, I am not sure that what you are seeing there is what you think it might be.
What is the "Real" name of that column in your SharePoint list? To find out, you need to go into your list settings in SharePoint, then click on that column to see its settings, then in the URL of that setting page, look at the very end of the URL. There will be a field=xxxxx where xxxxx is the real name of the column.
Please see screenshot attached. This is the same error I had with the previous solution. That split function does not like the D1_Team_Identification column? Power Apps named it differently than how it appears in the SharePoint data source. What do you recommend?
@Anonymous
Okay...grab some popcorn and read through this to see what you need to do next.
First, a slight easy change - For your Submit Button, you should ONLY have SubmitForm(FormMaster). All of the rest of that formula should be in the OnSuccess action of the form. We'll cover it shortly.
Next easy one - it appears that your D1_Team_Identification multi-line text column in your list has rich text turned on. Turn off the rich text and set it to Plain text.
I do not know what the name of your Gallery is for the repeating rows as I don't see it in any pictures. So I will just call it galRepeating.
On the Plus/Add icon in your screen, set the OnSelect formula to the following:
UpdateContext({lclChanges:
MasterForm.Updates.D1_Team_Identification &
Text(Coalesce(Max(galRepeating.AllItems, ID), 0)+1) & ";;|"
}
)
This will most likely show an error at this point...continue along and it will go away.
On the Gallery (galRepeating) Items property, set the formula to:
With({_items: Filter(Split(Coalesce(lclChanges, glbCurrentRecord.D1_Team_Identification), "|"), !IsBlank(Result) && !(Result="-"))},
ForAll(_items,
With({_item: Split(Result, ";")},
{ID: Value(First(_item).Result),
TeamMember: Last(FirstN(_item, 2)).Result ,
TeamTitle: Last(_item).Result
}
)
)
)
Next, IN your gallery row, I do not know the names for the two textinput controls you have, so I will call them, txtTeamMember and txtTeamTitle - substitute as needed.
In that gallery row add a new label (call it lblRecord) and set the Text property of the label to:
ThisItem.ID & ";" & txtTeamMember.Text & ";" & txtTeamTitle.Text
You can set the Visible property of this label to false. It does not need to be seen by anyone - it is only a formula helper label.
For the two TextInput controls in the gallery - txtTeamMember and txtTeamTitle, set the OnChange action of both to:
If(IsBlank(lclChanges), UpdateContext({lclChanges:glbCurrentRecord.D1_Team_Identification}))
Set the Default property of the txtTeamMember control to : ThisItem.TeamMember
Set the Default property of the txtTeamTitle control to: ThisItem.TeamTitle
On the Delete/Cancel Icon in your gallery, set the OnSelect action formula to:
UpdateContext({lclChanges:
With({_res:
Substitute(MasterForm.Updates.D1_Team_Identification, lblRecord.Text & "|", "")},
Coalesce(_res, "-")
)
}
)
Next on the Update property of the Datacard in your Master form for the D1_Team_Identification field, set the Default property of the TextInput control that is IN that datacard to:
Concat(galRepeating.AllItems, lblRecord.Text & "|")
Finally, set the formula in the Form_Save_All_Icon_Edit OnSelect action to : SubmitForm(FormMaster)
And in the OnSuccess action of the MasterForm, set the formula to:
Set(glbCurrentRecord, Self.LastSubmit); UpdateContext({lclChanges:Blank()});
Notify("Form saved successfully", Success); Navigate(Browse_Screen, Uncover)
Please follow the above to the letter and let me know what problems you might run into.
The one change this will make is that your multline text column (beside now being plain text) will have the following format to it - ID;TeamMemeber;TeamTitle|
The one addition is that there will be an ID column. This is only for the purpose of being able to uniquely identify rows in the gallery.
Edit: edit made above in red. Forgot to put this in.
Forms splitting completed. Please see attached for how I set that up to fit my requirements.
My repeating rows like InfoPath functionality is implemented programmatically? What do you recommend to populate the Master Form with repeating row data? D1 section is the first use case I need to re-create (see screenshot "repeating-row").
Realized I replied multiple times. I did not see page 2, apologies.
Hello again! I setup the forms in the way the video described. Please see word document with screenshots. The Edit screen has multiple forms connected to a master form. It gets submitted with a SubmitForm(). I see this is a much simpler method to editing forms. However, still unsure about the multi-line columns.
How would you go about getting records in the galleries like the previous functionality?
@Anonymous
Yes, please give that a go. It will simplify what you are doing with the multiple forms and, as a bonus, you will have a global variable (if you happen to follow the same name as I have in the video - glbCurrentRecord) and from that we can populate the gallery of the items based on a split of the text column in your record.
Let me know how you do on the forms and putting them together properly and if you need any help with that, then we can cross the bridge of getting these records in your gallery.
Ok I will re-watch, and make those changes on a copy of my app. I'll report back.
Thank you again sir!
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2