Forum Discussion

JosephNierenberg's avatar
JosephNierenberg
Iron Contributor
Jan 30, 2025
Solved

Disagreement with CoPilot on Flow Logic

CoPilot and I disagree about a filter in a flow. 

Currently, my flow selects items with the following filter:

DueDate le 'addDays(utcNow(), 2)' or DueDate eq 'addDays(utcNow(), 2)'

It seems to me that the "eq" piece is duplicative, because the "le" piece would include it. In other words, "less than or equal to two days from now" already includes "equal to two days from now." 

CoPilot, however, states that the "eq" piece is necessary. Its reasoning is not convincing. 

What light can a human Flow expert shed on this? 

  • You don't need the second part of the filter query as the first part will select all the DueDate items that are equal to or less than 2 February (i.e 2 days from today).

    Don't always rely on CoPilot, it will often give an incorrect answer.

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User.
    Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)




  • Rob_Elliott's avatar
    Rob_Elliott
    Bronze Contributor

    You don't need the second part of the filter query as the first part will select all the DueDate items that are equal to or less than 2 February (i.e 2 days from today).

    Don't always rely on CoPilot, it will often give an incorrect answer.

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User.
    Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)




Resources