How to filter Sharepoint list in Flow by current date plus days? - sharepoint-online

I've got a Sharepoint list tracking items and renewal dates associated with them. I want to utilize MS Flow to get just the items from that list (which will eventually have about 200 items in it) that have a renewal date 60 days from now, and send an email with the info from the list. This would recur every day.
The recurring feature works fine, as does the list and email.. My issue is with filtering the list down. I had hoped to be able to use views I created in the list, couldn't find a method for that, so I've resorted to attempting to utilize the ODATA filtering option.
I use the AddToTime feature before grabbing the list to get the 60 days out date (which is returning the correct value based on the error string), but no matter what I get invalid expression when it runs on the filter.
Any guidance on this?
This is Sharepoint Online and Flow Online. An example query string that I've used is Renewal_x0020_Date eq [insert the output from the Add to time flow item before].

RESOLVED!
Turns out, all I had to do was place single quotes around my object for the calculated date/time in my ODATA filter.

Related

can some one help me create a Power Automate flow

A power automate flow triggered on a daily schedule will check the list for any tickets that meet (or exceed) due date and submit a ticket to Orion via email. The last run and due date will then be updated. The system may be used to trigger tickets in supplier interface in the future - the destination system should be considered in the list schema.
i am having a hard time to develop a flow that executes the above requirement.
In Power Automate, create a scheduled flow that runs every day.
Declare all variables you will need later.
Assuming you store the value of the last run timestamp in a configuration SharePoint list for example, search and use the action Get item to get the list item where the last run time is stored in this list (you're have to create it if not existing though).
Search and use the function utcNow() in an expression to get the current datetime value.
Convert the previous datetime value with the action Convert time zone to an ISO-8601 datetime using FormatDateTime() function according to your timezone.
Search and use the action Get list items to get all the items of day from your SharePoint list, and filter the query via an OData expression according to the rule (today's date =< last run date + frequency).
Search and use Send an email V2 to send email.
Search and use the action Update item to update the last run time that is stored in a list item in the configuration list mentionned at the beginning.

Getting the latest value of the item in a column and displaying that value into other list, without using code

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.

Sharepoint 2013/2016 Calculated Column stops calculating

I have a calculated column in SharePoint On-Premises that shows the number of days till a due date which works perfectly for a day or so then stops calculating, but if I go to the list settings and click the column and click ok then it calculates again?
Has anyone experienced an issue similar to this. I had this issue in both 2013 but within a few weeks moved to 2016 and still the same issue.
I've tried " " blank and also "" empty so not sure if that is causing the issue??
Is it a problem with the formula?
Here is the formula:
=IF(ISBLANK([Due Date])," ",
IF(ISERROR(DATEDIF(NOW(),[Due Date],"d"))," ",DATEDIF(NOW(),[Due Date],"d")))
Calculated columns cannot contain volatile functions, which includes those that depend on the current date.
The values in SharePoint columns--even in calculated columns--are stored in SharePoint's underlying SQL Server database.
The calculations in calculated columns are not performed upon page load; rather, they are recalculated only whenever an item is changed (in which case the formula is recalculated just for that specific item), or whenever the column formula is changed (in which case the formula is recalculated for all items).
If you need to show a dynamic value that changes with the passage of time, you have a few alternatives.
Client-Side Rendering
Consider using client-side rendering which lets you use JavaScript to dynamically determine how records in a list view are displayed. This JavaScript runs upon page load, so it can handle current time-dependent values much better than a calculated column.
To use client-side rendering, you create a JavaScript file that controls how the view displays. You upload that file to somewhere on SharePoint where people will have at least Read access to it, then edit the list view web part that you want to display differently and set its "JSLink" property to point to your JavaScript file.
Check out this answer for an example of using a JSLink file to spoof a dynamic date field.
Microsoft also provides some documentation here but I think they do more work than is necessary (creating an entire new list definition project in Visual Studio for their example instead of just creating a JSLink JavaScript file for an existing list).
Other Options
A few other options are mentioned in the older question linked above:
Conditional Formatting: You can apply conditional formatting to highlight records that meet certain criteria. This can be done using SharePoint Designer or HTML/JavaScript.
Filtered List views: Since views of lists are queried and generated in real time, you can use volatile values in list view filters. You can set up a list view web part that only shows items where Created is equal to [Today]. Since you can place multiple list view web parts on one page, you could have one section for today's items, and another web part for all the other items, giving you a visual separation.
A workflow, timer job, or scheduled task: You can use a repeating process to set the value of a normal (non-calculated) column on a daily basis. You need to be careful with this approach to ensure good performance; you wouldn't want it to query for and update every item in the list if the list has surpassed the list view threshold, for example.
To expand on the Filtered List Views option, you can have a view that shows only items that are due within a certain number of days. For example, you can display all the items due within 7 days by filtering where the Due Date field is less than [Today]+7 and Due Date is greater than or equal to [Today]. You could also sort the view to show the items with earlier due dates closer to the top.

How to create a List Price Sheet filtered with Last Date Modified column in Dynamics-NAV

I'm trying to generate a List Price Sheet report using the Dynamic NAV gui, which is located under Departments > Sales & Marketing > Inventory & Pricing.
Under the Reports and Analysis there is an option called List Price Sheet, which we use to create the price lists as Excel Files.
What I would like to do is to return only items that has been created or modified during an specific year, instead of having a list of all Items in the ItemCard.
When I add the Last Date Modified as a filter, it does not matter what value I enter, it keeps giving me a warning saying...
One or more filters are not valid and will be ignored. Do you want to continue?
Is there's a way I can accomplish that using the GUI or this is something that needs to be done with a custom function?
this "List Price Sheet" is not a standard report (NAV has a standard set of reports for every modules) therefore we can't help. You should contact your (=your company's) NAV partner for help.
Maybe if you can share the warning/error what you getting when entering the date I can help. Here is a link which maybe helps : Entering Dates and Times in Dynamics NAV
Cheers!
Sorry I did not provided more depth information, the problem was, that I was trying to search as string the value "2015", which is not a valid parameter to pass when searching a DateTime column. I have to search using a Date range, cause I wanted to get the result for the specific year 2015, in my case, the value I should've pass was:
01/01/2015..12/31/2015
Which return all items that has been modified during this specific year. After doing that I found out that every time NAV developers updated the production site with the test site, all items were marked as modified the date the update occurred. So was not of use for me any way.

SharePoint Nintex Workflow Run Multiple Conditions

I was hoping you could help me. I have a calendar in SharePoint 2010 that I want to run a Nintex Workflow when the following conditions are true:
A new item is created
The "Type of Leave" field equals "Vacation". This field I created as just a category for the types of requests.
The date that the item was created for already has an entry with the "Type of Leave" field equaling "Vacation."
The use of this will be that the first person to enter vacation on a day will be automatically granted. But if more than one person enters vacation on the day that another vacation day is on, it will go through an approval process through their manager.
Here's what I've tried/reviewed:
- Using a Condition within a workflow. I can't find an option that would complete this.
- I did try looking on line searching for different solutions. I've watched some tutorials but nothing with this kind of solution was present.
- One thought I did have was to have an additional calculated column that counted how many entries for the same day with "Vacation" and then use that in a condition if the column was greater than 1 but I couldn't figure out the syntax.
This is on SharePoint 2010.
Thank you!
have you considered using the rest interface to query the list from nintex:
http://msdn.microsoft.com/en-us/library/office/ff521587(v=office.14).aspx
You can call this service from nintext using the call web service action.
Apply the filters on the url as per documentation above and count the records returned you can then include that in the nintext condition.
I am not sure if Nintext supports calls to Restfull services (from memory i think it does).
If not, you can use the Soap web service, same principle as above just the parameters to call it are slightly more complicated:
http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems(v=office.12).aspx
I don't think there's an need for REST. Once your workflow starts, query the list for items matching the current item booking date and put the result in a collection. You can query the collection length, and if it's >0 you can use that condition to steer the logic of your workflow.

Resources