I'm lost with this new community UI so I can't find a reply to button, but anyway:
- Container:Report_bug:
Control: GroupContainer
Variant: manualLayoutContainer
Properties:
Visible: =showReportBug
Children:
- lb:Information:
Control: Text
Properties:
Align: ='TextCanvas.Align'.Center
Text: ="Please use ""Submit a report"" functionality to report application bugs only. Data errors should be reported via standarized way."
Weight: ='TextCanvas.Weight'.Semibold
Height: =50
Width: =1064
X: =Parent.Width / 2 - Self.Width / 2
Y: =36
- btn:Submit_Bug:
Control: Button
Properties:
OnSelect: |
=Office365Outlook.SendEmailV2(
LookUp(
DeveloperInfo,
Name = "Developer"
).Email,
"Subject: Bug report",
"Bug reported by " & User().FullName & ": " & 'txt:Bug_Description'.Value,
{
Attachments: ForAll(
'Atch:Attachment'.Attachments,
{
ContentBytes: Value,
Name: Name
}
)
}
);
Notify(
"Your report has been submitted, thank you.",
NotificationType.Success
);
Reset('txt:Bug_Description');
/* Reset('Atch:Attachment');*/
Align: =Align.Justify
Appearance: ='ButtonCanvas.Appearance'.Primary
Text: ="Submit report"
DisplayMode: =If(IsBlank('txt:Bug_Description'.Value), DisplayMode.Disabled, DisplayMode.Edit)
Height: =49
Width: =120
X: =Parent.Width / 2 - Self.Width / 2
Y: =342
- Atch:Attachment:
Control: Attachments
Properties:
OnAddFile: =true
MaxAttachmentSize: =2
MaxAttachments: =2
Tooltip: ="Maximum 3 attachments"
BorderColor: =RGBA(214, 221, 224, 1)
BorderStyle: =BorderStyle.Solid
BorderThickness: =4
Color: =RGBA(0, 0, 0, 1)
DisabledBorderColor: =RGBA(166, 166, 166, 1)
Fill: =RGBA(255, 255, 255, 0.72)
FocusedBorderThickness: =4
Font: =Font.'Open Sans'
Height: =124
HoverColor: =RGBA(0, 0, 0, 1)
HoverFill: =RGBA(186, 202, 226, 1)
ItemColor: =RGBA(255, 255, 255, 1)
ItemFill: =RGBA(56, 96, 178, 1)
ItemHoverColor: =RGBA(0, 0, 0, 1)
ItemHoverFill: =RGBA(186, 202, 226, 1)
ItemSpacing: =0
NoAttachmentsColor: =Self.Color
PaddingBottom: =5
PaddingLeft: =If(Self.DisplayMode = DisplayMode.Edit, 5, 0)
PaddingRight: =3.75
PaddingTop: =3.75
PressedFill: =RGBA(0, 18, 107, 1)
Size: =14.99
Width: =460
X: =Parent.Width / 2 - Self.Width / 2
Y: =192
- txt:Bug_Description:
Control: FluentV8/TextBox
Properties:
Placeholder: ="Please provide accurate description"
Value: =
Height: =40
Width: =600
X: =Parent.Width / 2 - Self.Width / 2
Y: =123
I have attached whole container code (where the att control is included), so there is a clear visibility of what is going there.
Screen overall is simple:
- Title Label
- Text Input
- Attachment field
- Button (button code attached in 1st post)
No matter what I do and what I try, smallest modification of Reset functionality causes an error (var, timers and so on).
I did a check and it is working if a attachment field is a part of a form but in my case, where I want to send an mail it is not - is there a possibility that this is Power App limitation?
I also tried this solution found in web:
Modified maximum attachment to 1 and updated button to:
{
Attachments: If(
CountRows('Atch:Attachment'.Attachments) > 0,
{
ContentBytes: First('Atch:Attachment'.Attachments).Value,
Name: First('Atch:Attachment'.Attachments).Name
},
Blank()
)
}
But it's still angry.