cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cyberco01
Post Prodigy
Post Prodigy

Repeating Table with Combo box and cascading textbox does not work in Edit Mode

Hi dears,

I have a PowerApps Form connected to SharePoint List.

I have a Repeating Table in the Form. One of the columns is a combo box connected to SQL and the other text boxes are populated based on the value selected in the Combo-box. This is happening correctly in the New Mode of the Form.

In the Edit Mode, the values saved are correctly displayed when we start to edit the form, however, when I add a new row in the repeating table and select a value from the Combo box, respective values are not populated.

Please help.

 

Code on the default of EmpName is as below:

If(SharePointForm1.Mode = FormMode.New, ComboBox3.Selected.NAME, ThisItem.txtEmpName)

 

cyberco01_0-1634634442035.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
cyberco01
Post Prodigy
Post Prodigy

@v-jefferni, this is resolved from my side. The resolution is as below - on the default cascading textbox named as 'EmpName' I put the below formula and it worked as expected.

 

If(SharePointForm1.Mode = FormMode.New, ComboBox3.Selected.NAME,
(SharePointForm1.Mode = FormMode.Edit && !(IsBlank(ThisItem.txtEmpName))), ThisItem.txtEmpName,
(SharePointForm1.Mode = FormMode.Edit && (IsBlank(ThisItem.txtEmpName))), ComboBox3.Selected.NAME, SharePointForm1.Mode = FormMode.View, ThisItem.txtEmpName)

View solution in original post

6 REPLIES 6
cyberco01
Post Prodigy
Post Prodigy

@v-jefferni it will be really great if you can help me on this.

Hi @cyberco01 ,

 

Since all other text values are based on the Combo box, no matter in which Mode, you could simply set the Text of the Label to:

ComboBox3.Selected.NAME

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

cyberco01
Post Prodigy
Post Prodigy

Hi @v-jefferni,

On edit of the form, the values are not fetched. On the employee number appears, rest all are blank.

Hi @cyberco01 ,

 

Could you please share the details of your App? What's in OnEdit now? What's the Items of the Gallery? What are Items of the Combo box as well as the Text of all those Labels?

 

In addition, if you could provide the collection result in Power Apps Studio when editing the customize App it would be great helpful.

vjefferni_0-1635128541840.png

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Hi @v-jefferni 

Please find below the details as requested.

cyberco01_0-1635147481261.png

 

Code on OnEdit of SharePoint Integration:

*********************************************

Refresh(BonusRequests);
EditForm(SharePointForm1);
Set (RepSecCOllString, LookUp( BonusRequests, ID=SharePointIntegration.SelectedListItemID, RepeatingSection));Clear (InvoiceCollection);
Set (EditRepSecStr,LookUp( BonusRequests, ID=SharePointIntegration.SelectedListItemID , RepeatingSection));Set(EditRepSecStr,Left(EditRepSecStr,Len(EditRepSecStr) - 1));
ForAll (
Split (
EditRepSecStr,
"|"
),
Collect (
InvoiceCollection,
{
lblSrNo: Trim(Text (Last (FirstN(Split(Result,";").Result,1).Result).Result)),
txtEmpNo: Trim(Text (Last (FirstN(Split(Result,";").Result,2).Result).Result)),
txtEmpName: Trim(Text (Last (FirstN(Split(Result,";").Result,3).Result).Result)),
txtPosition: Trim(Text (Last (FirstN(Split(Result,";").Result,4).Result).Result)),
txtRate: Trim(Text (Last (FirstN(Split(Result,";").Result,5).Result).Result)),
txtHours: Trim(Text (Last (FirstN(Split(Result,";").Result,6).Result).Result)),
txtTotal: Trim(Text (Last (FirstN(Split(Result,";").Result,7).Result).Result))
}
)
)
//EditForm(SharePointForm1);

cyberco01
Post Prodigy
Post Prodigy

@v-jefferni, this is resolved from my side. The resolution is as below - on the default cascading textbox named as 'EmpName' I put the below formula and it worked as expected.

 

If(SharePointForm1.Mode = FormMode.New, ComboBox3.Selected.NAME,
(SharePointForm1.Mode = FormMode.Edit && !(IsBlank(ThisItem.txtEmpName))), ThisItem.txtEmpName,
(SharePointForm1.Mode = FormMode.Edit && (IsBlank(ThisItem.txtEmpName))), ComboBox3.Selected.NAME, SharePointForm1.Mode = FormMode.View, ThisItem.txtEmpName)

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,442)