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 / Default value not pull...
Power Apps
Unanswered

Default value not pulled correctly from table

(0) ShareShare
ReportReport
Posted on by 19

Hi,

 

I'm making an inspection app, where I use three tables:

- WorkOrder --> Containing a list of work orders (WoId, WoDescription, etc.)

- Inspection --> Containing a list of inspection points (InspId, InspDescription, etc.)

- WoInsp --> Used to register the value, including the current WorkOrderID and InspectionId (WoInspId, WoInspInspId, WoInspWoId, WoInspValue)

 

I use a patch formula to save the inspection value to the WoInsp table, including the WoId and InspId. This works fine:

Patch('[dbo].[WoInsp]';Defaults('[dbo].[WoInsp]');{WoInspInspId: InspId;WoInspValue: InspValue; WoInspWoId:Workordernumber});;Back()

mhulsegge_0-1612094294930.png

 

Now when opening an inspection row on a work order, there are 2 options:

1. If the combination of WoId and InspId are not pressent in the WoInsp table, leave the inspection value empty

2. If the combination is found, then show the WoInspValue

 

I added this formula to the default option of the field that must show the value (The WoId is set to variable Workordernumber)

If(LookUp('[dbo].[WoInsp]';ThisItem.InspId in WoInspInspId&&Workordernumber in WoInspWoId;"Yes")<>"Yes";"";LookUp('[dbo].[WoInsp]';ThisItem.InspId in WoInspInspId&&Workordernumber in WoInspWoId;WoInspValue))

 

Thereby I set the reset option of the field to "True"

 

But still, after I save the record (using the patch formula), and I'm going to another work order with the same inspection point, it will show the last entered value. 

 

Any suggestions?

Categories:
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @mhulsegge ,

     

    Could you tell me:

    What’s variable Workordernumber? What is its specific formula?

    What controls’ property are these two formulas used for?

    What’s Yes column?

    Could you describe the problem you encountered in more detail? Sorry I can't fully understand your needs.

     

    Could you provide more information? I want to know which controls you use. It would be better if you provide some pictures.

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard