ClearCollect(
colImages,
AddColumns(
RenameColumns(
'AttachmentControl-1'.Attachments,
"Value",
"ContentBytes"
),
"@odata.type",
""
),
{
Name: "Signature.jpg",
ContentBytes: 'Signature-1'.Image
}
);
Office365Outlook.SendEmailV2('Lbl-AllEmailAddresses' , 'Result-Job-Number'.Text , "Hi,<br><br>
Please see completed form below and attached photos<br><br>
<a href=https://DomainName.sharepoint.com/sites/PowerApps/Lists/SharePoint List/AllItems.aspx>Click Here to View the Full SharePoint List</a><br><br>
<b>Classification: </b>"&'Dropdown-Classification'.Selected.Value&"<br>
<b>Date Identified: </b>"&'Date-Created'.SelectedDate&"<br>
<b>Status: </b>"&'Dropdown-Status'.Selected.Value&"<br>
<b>Date Closed: </b>"&'Date-Closed'.SelectedDate&"<br>
<b>Time Identified: </b>"&'Result-TimeIdentified'&"<br><br>
<b>Job Specific?: </b>"&'Dropdown-JobSpecific'.Selected.Value&"<br>
<b>Job Number: </b>"&'Job-Number'&"<br>
<b>Business Unit: </b>"&'Dropdown-BusinessUnit'.Selected.Value&"<br>
<b>Originating Department: </b>"&'Dropdown-SourceFunction'.Selected.Result&"<br>
<b>Cause Category: </b>"&'Dropdown-CauseCategory'.Selected.Title&"<br>
<b>Source: </b>"&'Dropdown-Source'.Selected.Value&"<br><br>
<b>Immediate Correction: </b>"&'Txt-ImmediateCorrection'&"<br>
<b>Permanent Preventative Action: </b>"&'Txt-PermanentPreventative'&"<br>
<b>Business Change Required: </b>"&'Dropdown-BusinessChange'.Selected.Value&"<br><br>
<b>Notes: </b>"&'Notes-1'&"<br><br>
<b>Labour Costs: </b>£"&'Result-LabourCosts'&"<br>
<b>Material Costs: </b>£"&'Result-MaterialCosts'&"<br>
<b>Equipment Costs: </b>£"&'Result-EquipmentCosts'&"<br>
<b>Other Costs: </b>£"&'Result-OtherCosts'&"<br>
<b>Total Costs: </b>£"&'Result-TotalCosts'&"<br><br>
<b>Labour Cost Benefit: </b>£"&'Result-LabourCosts_1'&"<br>
<b>Material Cost Benefit: </b>£"&'Result-MaterialCosts_1'&"<br>
<b>Equipment Cost Benefit: </b>£"&'Result-EquipmentCosts_1'&"<br>
<b>Other Cost Benefit: </b>£"&'Result-OtherCosts_1'&"<br>
<b>Total Cost Benefit: </b>£"&'Result-TotalCosts_1'&"<br>
<b>Total Net Benefit: </b>£"&'Result-TotalCosts_2'&"<br><br>
<b>Unique ID: </b>"&'UniqueRefNum-1'&"<br><br>
Regards<br><br>
Bradbury Group<br></br>",
{Attachments: colImages}
);
Patch(QualityPortal, Defaults(QualityPortal),
{
UniqueID: 'UniqueRefNum-1'.Text,
Title: 'ValueDateTimeNow-1'.Text,
Classification: 'Dropdown-Classification'.Selected.Value,
'Date Identified': 'Date-Created'.SelectedDate,
Status: 'Dropdown-Status'.Selected.Value,
'Date Closed': 'Date-Closed'.SelectedDate,
'Time Identified': 'Result-TimeIdentified'.Text,
'Job Specific': 'Dropdown-JobSpecific'.Selected.Value,
JobNumber: 'Job-Number'.Text,
'Business Unit': 'Dropdown-BusinessUnit'.Selected.Value,
'Originating Department': 'Dropdown-SourceFunction'.Selected.Result,
'Cause Category': 'Dropdown-CauseCategory'.Selected.Title,
Source: 'Dropdown-Source'.Selected.Value,
'Immediate Correction': 'Txt-ImmediateCorrection'.Text,
'Permanent Preventative Action': 'Txt-PermanentPreventative'.Text,
'Business Change Required': 'Dropdown-BusinessChange'.Selected.Value,
'Labour Costs': 'Final-LabourCosts'.Text,
'Material Costs': 'Final-MaterialCosts'.Text,
'Equipment Costs': 'Final-EquipmentCosts'.Text,
'Other Costs': 'Final-OtherCosts'.Text,
'Total Costs': 'Final-TotalCosts'.Text,
'Labour Cost Benefit': 'Final-LabourCostBenefit'.Text,
'Material Cost Benefit': 'Final-MaterialCostBenefit'.Text,
'Equipment Cost Benefit': 'Final-EquipmentCostBenefit'.Text,
'Other Cost Benefit': 'Final-OtherCostBenefit'.Text,
'Total Cost Benefit': 'Final-TotalCostBenefit'.Text,
'Total Net Benefit': 'Final-TotalNetBenefit'.Text,
Notes: 'Notes-1'.Text
});
Navigate(Screen4,Cover)
Subtract One Number From Another (Total)
Sum('Result-TextInput1', - 'Result-TextInput2')
Hide Fields Based on Values
To hide the date closed label and date field, select both boxes and change the Visible setting to:
If(
'Dropdown-Status'.Selected.Value = "Closed",
true,
false
)
Ensure both boxes are still selected and change the DefaultDate setting to:
If('Dropdown-Status'.Selected.Value = "Open", Blank(), Today())