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 / DataCard Display Conte...
Power Apps
Answered

DataCard Display Content Wrong

(0) ShareShare
ReportReport
Posted on by 311

Hi,

 

Hopefully someone can help.

 

I have a Form where one of the DataCards is displaying the wrong content, the status within my gallery is showing correct and my View and Edit buttons have OnSelect as "Set(VarRecord, ThisItem); ResetForm('Main Form');ViewForm('Main Form');Navigate('Form Screen')"

Gallery.png

 

In the Form the result of the formula appears to be correct.

 

The image below shows the form in view mode and the output of VarRecord.Status is 'In Progress' and displays in the form correctly, as this is the last record that had been modified.

Status - Correct.png

However when I view another record, the output of VarRecord.Status is Complete, yet In Progress is being displayed in the Form.

Status - Wrong.png

 

Thanks in advance for any ideas on getting this working correctly.

 

Craig

Categories:
  • Bilakanti Profile Picture
    1,226 on at

    @Craig_Cowley I think varRecord still holds the old value, can you reset the variable and load it once again.

  • Verified answer
    Craig_Cowley Profile Picture
    311 on at

    @Bilakanti I was amending the formula in the 'Items' property box and should have been in the 'DefaultSelectedItems' property box. I found this by removing the formula in the 'Items' property and I still had a value in the datacard

     

    Thanks

     

    Craig

  • Craig_Cowley Profile Picture
    311 on at

    Hi @Bilakanti 

     

    I seem to fix one thing and something else breaks!

    I found that the 'DefaultSelectedItems' property was the problem. By changing the formula from:

     

    If(IsBlank(Var),Parent.Default,Var)

     

    to

     

    If(IsBlank(Var),Parent.Default,VarRecord.Status)

     

    It works correctly, however this now breaks my update buttons which change the status to either Complete or Cancelled.

     

    These buttons update the status using:

     

    Set(Var,LookUp(Choices([@'Origination Work Requests'].Status),Value="Complete"))

     

    I've tried changing the VarRecord to ThisItem.Status

     

    Any thoughts please?

     

    Thanks

     

    Craig

  • Bilakanti Profile Picture
    1,226 on at

    @Craig_Cowley what is the error that you're facing?

     

  • Craig_Cowley Profile Picture
    311 on at

    @Bilakanti my buttons to update the status, no longer update the status (in the Teams list as well) if I change the formula to get the Status datacard to view correctly!

  • Craig_Cowley Profile Picture
    311 on at

    @Bilakanti I've hidden the troublesome datacard and added text box  with the correct value.

     

    Craig_Cowley_0-1674833752632.png

     

    probably not the correct method, but it's now giving me the right result!

     

    Thanks


    Craig

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 350 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard