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()
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?

Report
All responses (
Answers (