I inherited a simple little feedback app that was built in the strangest way. Rather than create the SP list item directly from a Submit on the form, the Submit button passes parameter to a flow that then generates an email and creates the SP list item.
I understand why the email creation is in the flow but the SP list item could have been directly created but I don't want to rebuild this entire thing, I just want to pass the attachment details in the call and be done with it.
This is the call I inherited. There is no attachment parameter included even though there is an attachment control on the form which obviously confuses the hell out of everyone and why the ticket landed in my lap.
If(
IsMatch(
BusinessKCDataCardValue.Text,
"(?:http(s):\/\/)[\w.-]+(?:\.[\w.-]+)+[\w\-\.,@?^=%&:/~\+#\{\}]*"
) Or IsBlank(BusinessKCDataCardValue.Text),
PeerFeedbackFlow.Run(
EmployeeDataCardValue.Selected.Email,
FeedbackDataCardValue.Selected.Value,
DataCardValue1.Text,
If(
IsBlank(BusinessKCDataCardValue.Text),
"N/A",
(BusinessKCDataCardValue.Text)
)
);
Navigate(Screen2),
Notify(
"Invalid URL!",
NotificationType.Error
)
)
I tried the following but it errors because I'm not passing the filename and content correctly it appears.
If(
IsMatch(
BusinessKCDataCardValue.Text,
"(?:http(s):\/\/)[\w.-]+(?:\.[\w.-]+)+[\w\-\.,@?^=%&:/~\+#\{\}]*"
) Or IsBlank(BusinessKCDataCardValue.Text),
PeerFeedbackFlow.Run(
EmployeeDataCardValue.Selected.Email,
FeedbackDataCardValue.Selected.Value,
DataCardValue1.Text,
If(
IsBlank(BusinessKCDataCardValue.Text),
"N/A",
(BusinessKCDataCardValue.Text)
),
First(AttachmentsDataCardValue17.Attachments)
);
Navigate(Screen2),
Notify(
"Invalid URL!",
NotificationType.Error
)
)
I don't understand what the correct syntax is for that .Run call. It seems like the parameters showed be named somehow but maybe they just need to be sent in the correct order
and that's why it works now. PLEASE, ignore any screwed up formatting in this post. This new site sucks so bad I put off even making this post for days because of the new UI.
How do I correctly send the filename and contents so that they land in the Trigger step and I can then reference the file name and file contents in the Add Attachment step after
the Create Item step?