web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Update Field after Pat...
Power Apps
Unanswered

Update Field after Patch Update

(0) ShareShare
ReportReport
Posted on by 129

Hi,

 

I have a button which when the user selects brings up a popup (i.e. makes visible a bunch of fields to mimic being a popup etc) - the user can then select a new value for a field.  This does a patch update in the save and updates the source sharepoint list.   The sharepoint list is updated correctly. However, I can't seem to be able to  get the refresh to work on the main screen.  It requires the user to close that screen and go back in again to then show the correct value.


Here is my OnSelect on the Save button on my popup:


UpdateContext({varUpdateReviewDialog:!varUpdateReviewDialog});

Patch('Staff Members',varCurrentRec,{'Initial Review Date':dpInitial.SelectedDate});

Refresh ('Staff Members')


Staff members is my sharepoint list, the refresh doesn;t do anything.

 

The Default value of my initial review datacard is ThisItem.'Initial review'

 

here is a view of my popup - the field in the background is not updating after I select Save, unless I go out of the record and return

glitter1234567_0-1718082890864.png


Any ideas?

 

Thanks



 

Categories:
  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    hi @glitter1234567 ,

    after the save or update, you are not updating the items property of the form just update the items property of the form no need to use refresh.

  • glitter1234567 Profile Picture
    129 on at

    Thanks, sorry but how do I do that specifically?  The item property of that form is my varCurrentRec?

  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    if you are using set than:

    Set(varCurrentRec,formName.LastSubmit)

    if you are using context:

    UpdateContext({varCurrentRec:formName.LastSubmit})
  • glitter1234567 Profile Picture
    129 on at

    Hi @anandm08 ,

     

    thanks for your help.  I am using set but when I do set(varCurrentrec, frmGeneralDetails.LastSubmit) - it just blanks out my entire form

    glitter1234567_0-1718086334904.png

     

    Given it is only one field on that form I am updating in the popup - is there a way to refresh just that value i.e. Initial review

  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    yes this is because you haven't called the edit form just after the set use EditForm(formName)

  • glitter1234567 Profile Picture
    129 on at

    Thanks for helping - and sorry if I am seemingly not doing the obvious, I am new to powerapps!

    I tried adding the EditForm also on my Save but it just does the same as per my screen shot above just blanks the form out.  here is what I have in my OnSelect of my Save

    UpdateContext({varUpdateReviewDialog:!varUpdateReviewDialog});

    Patch('Staff Members',varCurrentRec,{'Initial Review Date':dpInitial.SelectedDate});

    Set(varCurrentRec,frmGeneralDetails.LastSubmit);

    EditForm(frmGeneralDetails);


    Refresh ('Staff Members')


     

  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at
    UpdateContext({varUpdateReviewDialog:!varUpdateReviewDialog});
    
    Patch('Staff Members',varCurrentRec,{'Initial Review Date':dpInitial.SelectedDate});
    
    Set(varCurrentRec,frmGeneralDetails.LastSubmit);
    
    ViewForm(frmGeneralDetails);
  • glitter1234567 Profile Picture
    129 on at

    Yes I tried ViewForm as well as EditForm and removed the refresh - it still blanks the form and displays 'No Item to display'.  In fact I have multiple forms on my screen and it blanks them all not just the frmGeneralDetails 

     

     

  • Meekou Profile Picture
    on at

    How did you set for Probation Milestones?
    Is ThisItem a record from Staff Members?
    After saveing with June 2024, if you open the popup dialog again, will you see May or June for Initial Review?
    Share us the relationship between Main data and Initial review data.


    Best Regards,

    Meekou

    YouTube

    PowerApps

    PowerAutomate

  • glitter1234567 Profile Picture
    129 on at

    There is a gallery setup on a previous screen so when you select a staff member is sets the varCurrentRec to be ThisItem.  Then the form item's property is varCurrentRec.

     

    After saving June 2024 (or a new initial review date) - I see the new date.

    glitter1234567_0-1718236706942.png


    If I go out of the record, back to the gallery and then go back in again - the correct date is reflected.

    glitter1234567_1-1718236764320.png

    I hope that makes sense - thanks for your help 🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard