Input collection: myInspections18
Location | Date | InspectionCompleted |
Headquarters | 1/1/2020 | Yes |
Branch 1 | 1/1/2020 | Yes |
Branch 2 | 1/1/2020 | No |
Branch 3 | 1/1/2020 | Yes |
Branch 4 | 1/1/2020 | No |
Output collection: mySolution18 (replace InspectionCompleted with ‘No’)
Location | Date | InspectionCompleted |
Headquarters | 1/1/2020 | No |
Branch 1 | 1/1/2020 | No |
Branch 2 | 1/1/2020 | No |
Branch 3 | 1/1/2020 | No |
Branch 4 | 1/1/2020 | No |
Solution code:
//Create a collection
ClearCollect(myInspections18,
{Location: "Headquarters", Date: Date(2020,1,1), InspectionCompleted: "Yes"},
{Location: "Branch 1", Date: Date(2020,1,1), InspectionCompleted: "Yes"},
{Location: "Branch 2", Date: Date(2020,1,1), InspectionCompleted: "No"},
{Location: "Branch 3", Date: Date(2020,1,1), InspectionCompleted: "Yes"},
{Location: "Branch 4", Date: Date(2020,1,1), InspectionCompleted: "No"}
);
//Replace all values in a column code
ClearCollect(mySolution18,myInspections18);
UpdateIf(mySolution18,true,{InspectionCompleted: "No"})