Aug 12 2023
I have created a flow in Power Apps. The flow stores attachments received in a shared mailbox in a List.
The list contains a choice-field that I would like to assign a calculated value to.
- Get Attachment (V2) (emails sent to shared account)
- Initialize variable 'fname' as String
- Apply to each Attachments
- Get Attachment (V2)
- Set fname variable to outputs('Get_Attachment_(V2)')?[body/name']
- Condition items('Apply_to_each')?['isInline'] is not equel to true
- If yes:
- Create item in Sharepoint list (Title: fname)
- Add the attachment to the newly created List Item.
This part works.
But I am unable to understand how to set the value of a choice-field based on a formula.
In this case I want to assign the value based on the attachment filename, i.e'SPS*' -> ChoiceA,'*TA* -> ChoiceB,'*.xlxs' => ChoiceC,etc.
(ambiguities in rules is not a practical issue)
Any help would be much appreciated. I'm new to Sharepoint but can code.
Aug 13 2023
Aug 13 2023
go to your field in the "Create Item in SharePoint" action and select "Enter custom value"
Go to the "Expression" tab, enter the following formula and press update