cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Super User
Super User

Strange behavior patching a collection to SharePoint

I am seeing some very bizarre behavior with one of my apps.    It works properly most of the time, but occasionally it is creating items in the list and populating only 3 of the 8 columns with the data.   The user can see the data in the collection as it's similar to an infopath repeating table, but setup to display the record once it's been patched to the collection, so they would see if the collection was missing the information.

 

About 20 people use this app and this has happened to most of them over the past few months (I only was told about it yesterday).  

 

I can't find a pattern anywhere in time of day, number of items in the collection, nothing stands out to me. 

 

any suggestions as to how I can track down the issue would be greatly appreciated.

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@JR-BejeweledOne 

This is the never ending balance of design and function!!  The designer must try and come up with every possible break and account for it...until the user finds the one you forgot!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

17 REPLIES 17
joeinmay
Resolver II
Resolver II

Try removing the connection and add it back again.

RandyHayes
Super User
Super User

@JR-BejeweledOne 

What is the formula that you are using?  This kind of behavior will happen if PowerApps experiences a conversion issue in the column values.  It will partially update or in some cases not at all.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
JR-BejeweledOne
Super User
Super User

Your comment led me to look at my collection.   I had it set up a specific way because I was patching a lookup field.    When I no longer needed that I turned it into a plain text field, however didn't change the collection as it 'seemed' to be working.

 

I have fixed that and will monitor it.    Pretty sure it was the issue.



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

 

Unfortunately that was not the solution.    Here are the specifics.

 

This is the list

 

TEList.png

 

 

Here is the 'On App Start' initialization of the collection:

 

Collect(
colEffort,
{

BusinessGroup: "",
ProductCategory: "",
Effort: 0,
WeekEnding: Now(),
Manager: "",
Developer: "",
SortDate: "",
ShowSave: true,
BlankRow: true
}

);

 

Saving to the collection:

 

Patch(
colEffort,
ThisItem,
{
BusinessGroup: DropdownBusinessGroup.Selected.Title,
ProductCategory: DropdownProductCategory.Selected.Title,
Developer: varUser,
Manager: varManager,
Effort: Value(TextInputEffort.Text),
WeekEnding: DPWeekEnding.SelectedDate,
SortDate: varSortDate,
ShowSave: false,
BlankRow: false

}

);

 

 

Patching the list:

ForAll(colEffort,

Patch(

'Tech Writing Effort', Defaults('Tech Writing Effort'),

{
Title: varUser,
'Business Group': colEffort[@BusinessGroup],
'Product Category': colEffort[@ProductCategory],
'Week Ending': colEffort[@WeekEnding],
SortDate: colEffort[@SortDate],
Effort: colEffort[@Effort],
Manager: varManager,
'Content Developer': varUser

}

)
);

 

 

 

 

 

@RandyHayes 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
RandyHayes
Super User
Super User

@JR-BejeweledOne 

Use this for your List patching formula:

Collect('Tech Writing Effort',
    ForAll(colEffort,
        Patch(Defaults('Tech Writing Effort'),
            {
              Title: varUser,
              'Business Group': BusinessGroup,
              'Product Category': ProductCategory,
              'Week Ending': WeekEnding,
              SortDate: SortDate,
              Effort: Effort,
              Manager: varManager,
             'Content Developer': varUser
            }
        )
    )
);

 

I would also be somewhat suspicious on the varManager and varUser variables as I do not know how you are setting them.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks, I will try that.

 

I set the varUser like this:

Set(varUser, Office365Users.MyProfileV2().displayName)

 

In this particular case, varManager is a lookup from a list.  It's not the users actual manager but someone who manages the specific content team they write for.

 

so it's set like this:   All single line of text columns in the list.

LookUp(DevTeams, Title = varUser, Manager))

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
RandyHayes
Super User
Super User

@JR-BejeweledOne 

Very good, they look fine.

So try that formula out than and let me know if that helps.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Did that, didn't help.

 

Still experiencing the issue and there is no consistency as to why.   I am going to build in  some error handling to see if we can at least **bleep** it in the bud.

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
RandyHayes
Super User
Super User

@JR-BejeweledOne 

Okay...let's step back a bit - you originally said that only 3 of the 8 columns would get data.  Can you tell me which 3 got data and which ones didn't?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,091)