Sometimes it is desirable to only run one flow instance at a time. For example if you have a scheduled flow that are running at a set interval were you are processing some records, you normally do not want another flow instance to start running before you are done processing the first batch to avoid running the same records again. To avoid such scenario, you can enable concurrency control on the trigger. This is done by clicking on the three dots and selecting Settings
In the new dialog that opens, toggle concurrency control from Off to On and pull the slider down to 1.
Finish by pressing Done
This will ensure that only one instance of your flow are running at the same time.
Today there is really no great way to format the input of a text field in Canvas Apps. One solution to this shortcoming is to use two fields, and enter the text into an transparent field and format the text in another TextInput that lies below the transparent one.
In this example I will format a swedish cell phone number as we normally do here, which is AAA-BBB CC DD.
Start by creating a new Canvas App, in this example I used the Phone Layout. Start by dragging to TextInput-field to the canvas and rename them to PhoneRaw and PhoneFormatted.
As the default-value for PhoneFormatted, enter the following formula
Left(Concat(Filter(Split(PhoneRaw.Text, ""), Result in 12345678909), Result), 3) & "-" & Mid(Concat(Filter(Split(PhoneRaw.Text, ""), Result in 12345678909), Result), 4, 3) & " " & Mid(Concat(Filter(Split(PhoneRaw.Text, ""), Result in 12345678909), Result), 7, 2) & " " & Mid(Concat(Filter(Split(PhoneRaw.Text, ""), Result in 12345678909), Result), 9, 2)
There is a lot of repetion here, but as far as I know there is no other way to do this. We can now test this by entering some text into PhoneRaw, and see that it will filter away anything that isnt a number and also that it will format according to the specified format.
We now have a functionally formatting. The next step is to make the RawPhone field transparent and put in on top of phone formatted. Select PhoneRaw, and under properties scroll down to Color and make all attributes transparent.
When you are done the Color settings should look like below
Now the PhoneRaw field is transparent and can be hard to locate on the canvas, but if you select it from the tree view there shouldnt be any problems.
Grab the invisible element and drag in on top of PhoneFormatted. If the formatting doesnt seem to work, one issue I had were that the wrong element were put in front of the other. To solve this, right click on RawPhone, select Reorder and chose Bring to Front.
When you have done this, try again and you should now have working formatting. Another downside of this solution is if the user tries to select the text in the textbox, because it is the unformatted text that are in front and will be selected.
Today I had a requirement to create a Flow in Power Automate to change owner on accounts that had not been active for a certain amount of time. I thought that did sounded simple so I started with a confidence that this would be a 30min fix. As so many times before I were completley wrong.
But back to my flow, it looked similar to the one below where I listed all accounts that meet the requested conditions, and for each of the account I would simply set the owner to a common team that could be accessed by a number of people to make sure that this account werent forgotten.
What we are doing is that we are selecting the team to move the accounts to, store the Id using Compose to avoid the need to initialize any variables, and then for each account that we selected earlier in the flow (not showing here), we simply update the account using the Id from the Compose step.
This seems simple enough, but this time I received an http 400 error, saying Bad Request with the following Body. (this is were I should have realized that I could side scroll)
I struggled with this error message for a while before I went back to what I know best, how to code. Using LinqPad I sent a simple Update request with the same values as in my flow, but this time I got back a response that I was familiar with.
client.Update(
new Entity("account")
{
Id = recordId,
["ownerid"] = new EntityReference("team", teamId)
});
FaultException`1: Principal team (Id=7ac39076-415d-ea11-a811-000d3ab46b12, type=9, teamType=0, privilegeCount=0), is missing prvReadAccount privilege (Id=886b280c-6396-4d56-a0a3-2c1b0a50ceb0) on OTC=1071 for entity ‘customeraddress’. context.Caller=e1bc9319-9c04-ea11-a811-000d3ab46b12
Finally I realized that my team that I had created for this requirement did not have enough privilegies to perform the operation. After assigning the team to the appropriate roles my Flow succeeded without any error.
To late I realized that the same error message were present in the body of my Update action in my flow, if only had I scrolled to the right!