cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
colbyc
Helper III
Helper III

Appended Changes to exisiting text dissapearing

Hello,

 

I have a Sharepoint List form that has implemented the solution found in below linked video, where users make an entry to a Text Box (will call this Box A) on Screen 1, and upon saving, the entry in that text box is appended to another screen in the app. This second screen (Screen 2) is supposed to hold every entry made. Currently, if the user makes any change on the Screen 1, and one of the changes is an entry to Box A, Box A's contents correctly are appended to Screen 2. However, if a user makes changes to Screen 1 but doesn't enter anything in the Box A, all prior entries on Screen 2 are erased. I can still see every entry when looking at the list item's details pane, but in the form everything is erased. Any idea why this might be?

 

 

https://www.youtube.com/watch?v=hzLEecSpmFo

1 ACCEPTED SOLUTION

Accepted Solutions

@colbyc ,

You did not say how you save the data before moving screens, however try this on the Item on both Forms

LookUp(
   'Application Change Request',
   ID=SharePointIntegration.SelectedListItemID
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

14 REPLIES 14
WarrenBelz
Super User III
Super User III

@colbyc ,

What are the Items of both forms and what code do you use to save the data on screen A?

Hey @WarrenBelz 

 

The Items property on Form1 on Screen1 is

First(Filter('DataSourceName', ID = SharePointIntegration.SelectedListItemID))

 

On Form2/Screen2-

If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),First([@'Application Change Request']),SharePointIntegration.Selected)

@colbyc ,

You did not say how you save the data before moving screens, however try this on the Item on both Forms

LookUp(
   'Application Change Request',
   ID=SharePointIntegration.SelectedListItemID
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

WarrenBelz
Super User III
Super User III

Hi @colbyc ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hey @WarrenBelz 

 

Apologize for delayed response! I tried that solution and it actually began erasing the values from Screen 2 entirely, not saving them at all.

 

For saving value of the textbox to Form2 comments into a text box-

 

On Screen 1, DataCard24 has a visible Text Input field called TextComment that the user types their entry into. DataCardValue24 is a hidden rich text editor field. The Data Card's Default field is set to the following (Work Log is the Sharepoint field name)

 

If(Not(IsBlank(TextComment.Text)),(User().FullName & " " & Now() & " " & TextComment.Text & Char(13))& ThisItem.'Work Log', ThisItem.'Work Log')

 

 On Screen 2, there is an Data Card containing an HTML text field. HtmlText is set to DataCardValue24.HtmlText.

 

So the process is - text input, which immediately adds it to DataCardValue24 since it defaults to value of that + the previous values (thisitem.worklog).  Html text on Screen 2 captures value of DataCard24.

 

This is all working perfectly whenever an entry is made to the text input. But when the form is opened and changes are submitted, with no entry in the text input, the value of the text input clears. I think it has something to do with the Default, but the Else in there should set it to be equal to what it was previously, without any appended values.

Hi @colbyc ,

A bit strange - what do you see in the control before something is put in (unhide it)? Also you have a few extra brackets - try this

If(
   !IsBlank(TextComment.Text),
   User().FullName & " " & Text(Now(),ShortDateTime) & " " & 
   TextComment.Text & Char(13) & ThisItem.'Work Log', 
   ThisItem.'Work Log'
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hey @WarrenBelz 

 

When I unhide the box, it seems to be what I'd expect - when I first open the form, it is filled with the previous Work Log entries that are being stored on Screen 2. That's the default value. When I make an type anything in the text input box, the old values disappear and the typed value appears. What I type also appears on Screen 2, appended to the old values. I can save the form, come back to it and it is all correct. Still though, when I make changes to the form but leave the text input blank, it erases all the previous entries to Screen 2.

 

Also worth nothing that I forgot to mention - 

The Default value of Screen 2's DataCard holding the HTMLtext box is the same as the Default value of DataCard24.  

 

Thanks for your help!

@colbyc ,

I am suspecting that 

ThisItem.'Work Log'

does not resolve on the HTML Box. Try making the Default

DataCard24.Text

 and simply refer to the card, which you have noted is resolving correctly.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

 

@WarrenBelz 

 

Still is behaving same way unfortunately. Any other ideas?

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,615)