cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

SP form loses the value after Save is hit

Hi All,

My form is working perfectly when i submit the values for this field "SF Reporting Role". I say perfectly because after submitting the values when i go back to see the values in list it shows up accurately for the column in question.

However, when i select the list item which then opens my Power Apps form view of the item- the field loses it's value and so when i save next, it's deleted or is blank already.

This field gets it values based on cascading that depends on another field "SF Reporting Role Group".

I think it has something to do with the DSI property, refer below

GauravG_0-1621439015950.png

The items property is this:-

GauravG_1-1621439110481.png

And the Update property is this:

GauravG_2-1621439147915.png

@RandyHayes Please check this

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Anonymous 

The issue is in the DefaultSelectedItems property.

In the Items property you have a formula that Shows the column "SFReportingRole".  The schema of your Items property then is a table with a single text column called "SFReportingRole".

 

Now, the DefaultSelectedItems (DSI) property is creating a table with a single text column called "SF Reporting Role Group".  This will never match the column name of the Items property.

 

So, change the DSI formula to:

If('Value- Report Type'.Selected.Value="Data Extract", Blank(),
    ForAll(ThisItem.'SF Reporting Role', {SFReportingRole: Value})
)

Notice with the above we are changing the resultant table schema to a schema that matches the Items property...so it should select properly.

 

I hope this is helpful for you.

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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

8 REPLIES 8
RandyHayes
Super User
Super User

@Anonymous 

The issue is in the DefaultSelectedItems property.

In the Items property you have a formula that Shows the column "SFReportingRole".  The schema of your Items property then is a table with a single text column called "SFReportingRole".

 

Now, the DefaultSelectedItems (DSI) property is creating a table with a single text column called "SF Reporting Role Group".  This will never match the column name of the Items property.

 

So, change the DSI formula to:

If('Value- Report Type'.Selected.Value="Data Extract", Blank(),
    ForAll(ThisItem.'SF Reporting Role', {SFReportingRole: Value})
)

Notice with the above we are changing the resultant table schema to a schema that matches the Items property...so it should select properly.

 

I hope this is helpful for you.

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

@RandyHayes That certainly helped on that error.

However, the error persists.

Not sure now which value to check besides these 3. The values were lost as soon as i edited the form in edit view.

Thanks

RandyHayes
Super User
Super User

@Anonymous 

When you say the error persists, are you saying the issue of "new is fine, then save, then open and view and it is empty"?  Or is there some other error?

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

Yes @RandyHayes 

So the order i am seeing it is this:

1) I select the values for the field "SF Report Role"

2) Submit the form

3) Go & check in the SP list (It shows all the values that I selected, just as before even when i had an incorrect formula that you just corrected in DSI)

4) When I select the record, the view form opens so that i can see all the fields- and this field is blank.

Hope it helps.

RandyHayes
Super User
Super User

@Anonymous 

Yes the DSI is solely responsible for "showing" prior data, so that would not impact updating the list item in anyway.

 

But...there is an issue completely with the DSI property.  The DSI formula that I last provided is going to return a table. Is your AllowMultipleSelections option turned on for that combobox?  I'm assuming so, but make sure.

 

Otherwise, you really need to take a closer look at what that DSI formula is producing for you.

Since you're Integrated, you can set the Item property of the form to a LookUp to that specific record (you recall how we did that before) and then look at the formula results for the DSI...is it producing a table of single column records?

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

@RandyHayes Multi Select is true.

I tried the below Lookup formula in Items property, it seems to be wrong for want of scope

GauravG_0-1621449573075.png

I tried this SPI thing formula too

But that seems to be wrong with almost the same error

LookUp(SharePointIntegration.Selected.'SF Reporting Role',ThisItem.ID= "445",ThisItem.'SF Reporting Role')

 

In the existing DSI formula when i click at the formula end- it does confirm that i am returning a table.

Anonymous
Not applicable

@Randy Infact, the formula you suggested also mentions about scope being missing for evaluation.

Refer this

GauravG_0-1621450203346.png

RandyHayes
Super User
Super User

@Anonymous 

You will need to (just for testing) set the ThisItem part of this to LookUp('Business...', ID=<theID>).'SF Re....

Replace the datasource name with the full name and the <theID> with the number you used for your Item property lookup.

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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
Users online (965)