I have the below "Vlookup" , When a record gets submitted in list "Template" I want that to reflect in the list "Aug2021"(Created from an excel sheet) in the "Submitted" column as a "Yes" or "No".
Lookup with between "Project ID" in Template, and "Title" in Aug2021.
IT works fine for the first record submission into "Template", The submitted column shows a "Yes" nicely within list "Aug2021" .
However when I submit a 2nd record, the vlookup resets and that first record will no go to a No. Why is this?
This is what I mean - the flow re runs based on the new record.
When Power Automate does not execute the branch I "think" it "should" execute, that always is because the condition is not met.
The only way to troubleshoot that is to look into what is actually being fed into the Condition. At least while you're still developing.
Initialise two variables at the top, one for the Title and one for the Project ID. Write the Project ID into the variable as soon as you have it. Write the Title into the variable before the Condition step.
Now you can see in the flow run what the values are and you can see the reason for the condition branch being executed.
Also note that the For Each loop will run on all records that are returned bye the Get Items step. This looks like it may write a lot of records that don't match the title.
Edit after comment: You say that the list Aug2021 has 2000 items. Are you attempting to loop through all of them in the flow? That won't work, because the Get Items command only returns a maximum of 100 items.
The flow run screenshot shows that it processed exactly 100 items in the Apply to Each loop. Your screenshot only shows the first one.
Unfortunately, you did not follow my recommendation for troubleshooting, so you still don't know which values are being fed into the condition for each instance of the Apply to Each loop.
If you don't follow advice, I have no idea what else to write.
Related
I can't figure out how to do a very simple update of a column value in Power Automate in SharePoint online. I've seen examples of how to update an item on another list, but nothing that updates a value on the same item that was just added and triggered the workflow. Can anybody give me an example and maybe a very brief explanation?
I want to multiply the values of two columns and add it to a third column on the same item which will be blank. I used the formula to update the column I want using values from other columns. =[Dollar Amount]*[% Chance] but it says invalid syntax. There seems to be nothing intuitive in this new power automation and it's a horrible failure compared to how easy it used to be. MS is always making these mistakes.
The first method, you could use a calculated column.
=[% Chance]*[Dollar Amount]
Second method,use Flow.
Test result:
It's Power Automate, not power automation. Details matter.
First, try to set the column value when you create the item. Then you won't have to edit it. If you already know the values for [Dollar amount] and [% Chance] (Chance, really? Or Change?), then you can use these to generate the value before you create the item. You can do that in a variable or with a Compose action. Then create the item and refer to the variable or the Output of the compose action.
If this is not an option, you can use the Edit Item action and get the ID for the item from the action above that you used to create the item.
You say "MS is always making these mistakes." - It's more likely that the problem is a mismatch of data types, e.g. using text fields in calculations, or typos, or wrong syntax. That's not a mistake made by MS. Again, details matter.
Edit after comments: If the workflow is triggered by an item getting created, then you can use an Edit Item action and refer to the ID from the trigger item.
I'm working on a project for our fabrication warehouse. Currently, we have a system where the workers will type in what order they are working on their tablets and then the part numbers, dimensions, etc will all autofill based on a query of all currently open manufacturing orders...
Whenever we have a prototype or expedited part it won't show up in the query. I was wondering if anyone knew some VBA code (or simpler solutions) that would allow us to keep the current data validation but also give operators an option to override.
Example series of events:
1- operator receives and types in order number
2- msgbox pops up saying "this doesn't exist --- is this a prototype or expedited part?" (answer Y/N)
3- Override message pops up "are you sure xxxx is the correct part number" (operator selects yes)
4- data gets inputed as usual but requires manual entries for dimensions, parts used, etc.
psuedo code:
steps 1-3 : a series of if statements and message boxes guiding the decisions is not too difficult
step 4: where im getting tripped up... how would i unlock that row so they could have custom input for that order and then lock it again once they are finished.
Just a suggestion.
What if you add a non-protected column to the file (assuming that each row is a new entry and entry details are stored in columns).
So, one column with data validation and a warning with the text you mentioned.
And another column to enter the order number manually.
I want to get the highlighted value, that is the latest value of the "Availed" from the list shown above, and display it on the second list's "Availed" column, circled below:
Basically, what I am trying to do is, whenever a new item is created in the second list, it fetches the latest value of the "Availed" from the first list and displays in its "Availed" column.
I have tried couple of lookups with IDs and dates using SharePoint designer 2013, but every time I am getting the first entry.
The only way, I could achieve this was, by mentioning the exact item ID in the lookup, but I do not want that. I want that it should automatically pick the latest value when a new item is created in the second list.
Also, there are couple of solutions online using the code, but I am not that great at coding and want to achieve this feature without coding.
Is there a way we can do this without a code?
You could create a workflow for second list, in your workflow, call REST api by 'Call HTTP Web Service' action, Sample here.
Use rest api to get the latest value by $orderby, demo here.
I need to be able to remove the delete button when today is greater than a particular calculated date.
There are 2 ideas I had and issues with each:
1 - Set a custom field on the record for the particular calculated date. Then use a workflow action of Remove Button where the custom field is <= today. My issue is I am wondering if there is a way to get "today" because I expected the condition to change allowing me to do that. I tried to use a formula and can't find Now() as a valid function listed.
2 - Workflow are truly scripts in the background. That means the Remove Button should be available in API. Therefore, my idea was to do my conditioning in suite script and then call this function. However, this function also does not exist in supported form. Has anyone hacked this to find what the function that is called in Remove Button is?
If we can get either idea to work, or if you have a third I haven't thought of that accomplishes the same task, that would be great.
I figured out my own answer. In case someone else ever needs this (as I didn't see anything like this on stack overflow), here is how to do option #1:
Save the value to a custom field - custbody_block_dlt_date
In a workflow, use the Remove Button function and use a formula condition
The condition is: {custbody_block_dlt_date} < sysdate
"sysdate" is the way you can get "Now()" or "today" in the condition
An alternative could be to create a User Event Script, on the before load function, get the button object then use the .setVisible(visible) method to hide it based on a date criteria, you may also want to set other restrictions based on roles that allow certain individuals to still be able to delete the record, like high positioned accountants. That avoids creating unnecessary fields on your records, while still providing the functionality that you desire. This could easily be done in < 4 lines of JavaScript.
See nlobjButton for examples.
I have a simple calculated column in my SharePoint 2010 list. It takes the list item ID, adds 100 to it.
When my users are creating items in the list, the calculated column does not get updated unless I go in, edit the column (do nothing) and save it. It, in fact, gives all items a value of 101 unless I manually edit the column.
Is this typical or is there a work around for this issue?
Thank you!
It is not possible to create calculated column based on ID value. The Id of the item is created after the item is added to the list.
You should use workflow instead.
The problem with using a workflow to do this (as per the accepted answer) is that workflow can take an appreciable time to execute. So you cannot create the ID until AFTER the new item is saved and there is always the danger that simultaneous users can create ID clashes that you also have to handle. If the workflow (as on a busy system) takes several minutes to work, you can also get the problem of someone else editing the item before the workflow has finished which may cause the workflow to fail leaving the item without any ID.
As an alternative, you might consider using JavaScript in the NewItem.aspx page to lookup and increment a counter from a separate list. Note that you have to update the counter as you read it if you are doing this so as to ensure that other users don't accidentally get the same ID if creating entries at the same time. This means that you must not mind the counter incrementing even if a user subsequently cancels the new item without saving.
As you noticed in opening/saving an item, The Calculated Column is updated on every item change.
Does it work to have a Workflow read the Title and write (the same) Title?
The [ID] reference in the Calculated Column should be set.
No need for an extra LookupID column then.