Trying to increment a Unique ID field in my SharePoint list every time my flow runs. Ex: If the Unique ID field in the last row before the flow runs again is "M10389". Then after the flow runs, a new item will be created underneath it and its Unique ID will be "M10390".
The only piece of the flow that doesn't work is the Unique ID part. Here are the pieces of code within the Unique ID field of the create item action block that won't work, but should.
I've tried:
concat(string(M),add(10386,triggerBody()?['resourceData']?['responseId']))
and
concat(M,add(10386,triggerBody()?['resourceData']?['responseId']))
P.S. The "triggerBody()?['resourceData']?['responseId']" is the number of submissions from the form that triggers this flow, and is how I am incrumenting the Unique ID field by one.
Neither work and I think it has something to do with the concat() function, because concat(m,n) doesnt work, neither does concat(string(M),string(2)), or even concat(string(m),string(n)). In fact, the only time concat works is when I'm using 2 numbers like concat(52,7).
The error message simply reads:
"us.flow.microsoft.com says
The expression is invalid."
How do I achieve what I'm after within power automate?
Picture of what this looks like:
A bit similar to Muhammad's answer. Try using a variable, and set the value of the variable to "triggerBody()?['resourceData']?['responseId']".
Then increment by 1 or any arbitrary number and use as needed.
Well another approach to achieve the same could be two create two variables, one to increment unique id number part and second one is to compose the unique id. you can set value of uniqueIdNumbervariable using the Add function like you are already doing i.e.
add(10386,triggerBody()?['resourceData']?['responseId']))
Then you can set the value of second variable uniqueID by using another set variable action i.e.
M uniqueIdNumber
(you need to select 'uniqueIdNumber'variable from dynamic content, in set variable value action for uniqueID variable. )
Then you can use uniqueID variable in Create Item action.
Related
I was trying to enable multi-select for Owner in Employee Time Activities and wanted to try based on below article.
https://asiablog.acumatica.com/2018/01/multi-select-selector.html
Then override view like below:
https://asiablog.acumatica.com/2017/11/sql-in-operator-in-bql.html
However, after I added ValidateValue = false in field:
I am getting this error.
I looked at the custom attribute and I don't think it could be replaced with anything keeping the same implementation.
So, is there any other way I can accomplish multi select feature to allow display Employee Time Activities for selected employees at once besides the ideas mentioned above?
Thanks.
Your primary issue is that DimensionSelector is different than Selector.
Secondary thing to keep in mind that when you do Multiselector you would need to update the field that holds the values to have a longer length. The way a multiselector works is that it stored the saved values as a ; (semicolon) separated string. so if the field was 10 long you would want to expand to whatever you expect the max number of selected values would be, e.g. 40 would be 480, 40x10 + 40x2, 10 being the original size, 2 being a semicolon and space. (hope that makes sense :) )
Next you would have to update all the functional business logic to then parse that string and loop each, in this case, employee for the functions.
I am speaking very generically here. So not sure what you're actually attempting to do here, but one would assume that if you were selecting multiple employees you would want records to reflect accordingly.
I am new to Power Automate flows. I was tasked to create a Unique Sample ID based on parameters from a SharePoint list, when an entry is created. I have created a SharePoint list, whose function is to hold the increment variable, which is my counter. The current flow increments this counter variable, whenever an item is created in the main SharePoint.
The Sample ID is suppose to reset every year based on the logged date of the incident, which is different than the stored date. For example, 2020SPI1, 2020SPI2, and 2021SPI1, 2021SPI2. I am trying to get an idea on how to do this.
I do not want a flow that resets the counter every year, since the stored date of the entry can be different from the date that the incident occurred.
In Order to make your format like 2020SPI1
Step 1: Initialize a vairable named as PatternId
Step 2: Set Variable. You can use string concat function in value of variable as following
concat(formatDateTime(utcNow(),'yyyy'),'SPI',items('Counter')
First argument here will produce current year: 2020.
Second argument is a static string: SPI.
Third your counter value from the list holding incremented number.
Then finally you can use PatternId to updated the id in your list column. Hope this can help you out.
I´m trying to set up unique values in my PowerApp-Form. The data is stored in a Sharepoint list. I have a column called watches, items in this column have a unique number, which have to be unique. People can pick multiple of those watches in a LookUp-field. But before submitting the form, I need to check if those picked values already exist in my list and at least display an error message.
I have setup a regular text field and added following rule to it:
If(LookUp(MyList.Watches;DataCardValue4.SelectedItems.Value in Watches;"OK")<>"OK";"No Error";"Watch already exist")
DataCardValue4 is my LookUp field, where people can pick those watches. With this rule I want to check if a item already is in my column watches and let my text field display the error. Somehow the rule doesn´t work.
Can you tell me how I compare multiple lookup choices to my table/column entries?
The first parameter to the LookUp function should be the table (SharePoint list) rather than the column. So the first parameter should be 'MyList' rather than 'MyList.Watches'. Also, I'm not sure that the formula provided (second parameter to LookUp) will work. In your formula, you will be looking for multiple items (DataCardValue4.SelectedItems.Value) within multiple items (Watches). Perhaps you can update your app to have users only pick one watch value before submitting?
One last thing to note. I'm not sure how big you expect your SharePoint list to get, but I would highly recommend keeping your LookUp formula within the bounds to support delegation. More specifically, SharePoint has different formula requirements than other connectors. For example, you can use '=' in your formula, but not 'in'.
Your new rule might look something like below. Please note that it could have syntax errors and might not even be delegable in it's current form since I am providing the rule with no checking. Also, I switched from using LookUp to using Filter instead just because I'm more familiar with Filter. However, both functions are very similar.
If(CountRows(Filter(MyList; DataCardValue4.Selected.Value = Watches)) > 0; "Watch already exist"; "No Error")
I want get all values of dropdown and want to store them somewhere. from follwing NASDAQ site https://www.nasdaq.com/symbol/ge/historical i want get all values of Timeframe and want to somewhere so that i can use those values one b one in loop and get the values of stock for all timeframe. Click below image screenshot
It's not that easy to get each of the values, but it's not impossible. First you can get all the values in a Data Item as text. If you spy the element, you will notice that the attribute Value contains what you want. So you will need to use a read stage and get this specific attribute's value (you can ignore the PDF elements):
Doing so will give you the following:
The problem with this is that you cannot use this in a loop. One way around would be to split on space:
And the resulting collection (I called it Split Values) will look like this:
But it's not quite there yet. You should however be able to use this collection to get the collection you need (or use it directly).
If you use it directly, I would say it should look like this:
Empty? has the expression [Split Values.words]="" (notice the last row is blank)
Value is number has the expression IsNumber([Split Values.words])
Set Current Item as Number has expression [Split Values.words] with store value Current Item.
Append word to Current Item has expression [Current Item]&" "&[Split Values.words] with store value Current Item.
I am using a SharePoint list that was migrated from an old Windows 2003 server to an existing 2008 server. This list is used to track issues raised by users against another application - a list of jobs to do if you will.
In the old list there was an Id field. When the list was recreated in the new area the assigned ID number was different, for example
Old ID New ID
--------- ---------
5 204
6 2
7 3
8 159
9 4
This assignment does appear to be fairly random.
To negate this a calculated column was created, so IDs raised before the migration use the Old ID number, and new calls raised after the migration use a calculated value. The calculation is
=IF(ISBLANK([ID (Old)]),ID+8,IF([ID (Old)]<=348,[ID (Old)],ID+8))
This compares the ID (Old) to blank, and if so, it is a new call and should have the default ID number, plus 8 (I think there was a total of 8 calls made during development that were then removed).
Otherwise if the Old ID number is less than 348 (the call number when we migrated), use the Old ID number.
If neither condition is met, simply set the ID to the new ID number plus 8.
This works fine when creating new calls.
The problem arises when I edit a call. For example if I set the ETA to a new value and save the call, the Calculated ID is always reset to 8.
I can fix this by going in to List Settings -> Opening the calculated column -> and clicking OK. This reapplies the calculation and everything is numbered correctly again.
For information - due to the environment this is deployed in I am not able to use SharePoint Designer at all.
The question is, how can I stop the renumbering when I edit an item?
The ID field behaves a bit oddly with calculated columns. A calculated column formula will find the ID of an item and resolve it properly when items are created or when the formula is modified, but as you discovered, when an item is modified, the formula can't find the ID value. (My guess is that this has to do with the ID field not being included in the list of column values being sent to the database on update, perhaps because the ID field should never change.)
One way around this is to use a workflow (or a custom event handler, if you have too much time on your hands) to copy the ID field to another column, such as a number or single line of text column, whenever an item is created. You can then use that new column in your formula instead of using the ID column.
To prevent people from updating your dummy ID column, you can hide it from the forms. To do this, first enable management of content types for the list, then edit the Item content type, find the new dummy ID column, and change it to "Hidden" (instead of "Required" or "Optional").