Created a flow using filter array for whenever the item is modified need to sent a email of which columns has changed with previous and current Values .

Anonymous
2022-10-08T05:41:09+00:00

Hello All ,

I have created a automated flow whenever a list has been modified need to sent a email of which columns has been changed with current and past record values .

It is working fine with text columns and date fields but dropdown values are coming with odata .

I have tried to use item().value inside the triggeroutputs but its throwing error .Please help

If I dont include the item().value in filter array I'm getting this output .

Thanks

Pragna

Microsoft 365 and Office | SharePoint | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} vote
Answer accepted by question author
  1. Anonymous
    2022-10-12T06:05:46+00:00

    Dear Pragna,

    Sorry for the late reply.

    I carefully do tests in each step and I find that most of the steps are correct. You can create the flow as follows.

    The formula in Since in Get changes for an item or a file (properties only): add(int(triggerOutputs()?['body/{VersionNumber}']),-1).

    From in Filter Array; split(string(outputs('Get_changes_for_an_item_or_a_file_(properties_only)')?['body/ColumnHasChanged']),',').

    item() contains string(':true').

    Compose: outputs('Get_changes_for_an_item_or_a_file_(properties_only)')?['body/SinceVersionId']

    Send an HTTP request to SharePoint Online

    Method: Get

    Uri: _api/web/lists/GetByTitle('listdemo00B')/items(@{triggerOutputs()?['body/ID']})/Versions(@{outputs('Compose')})

    From in Select: body('Filter_array')

    Map: json(item())

    Compose2: triggerOutputs()?['body']?[item()]

    To get the correct changed Choice column value, you may type the formula if(contains(string(outputs('Compose_2')),'SPListExpandedReference'),outputs('Compose_2')?['Value'],outputs('Compose_2')) in changeto in Append to array variable.

    Result:

    Sincerely,

    Cliff | Microsoft Community Moderator

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-10-08T06:10:53+00:00

    Dear Pragna,

    Welcome to the forum here.

    From the screenshots, it seems that you are using Rest API to get the item version and corresponding column values.

    As you are using a little complicated flow, for us to do a test in our environment, could you confirm and provide the following?

    1. Some screenshots of the list you are using with the flow and the column types you are using for the list columns. Regarding the dropdown values, are you using a Choice column? If yes, is the Choice column multiple-selection or single-selection?

    Note: Remove any private information before uploading the screenshots.

    1. The call Uri in Rest API and the method in the call.
    2. The conditions in the flow you are usng.
    3. The split formula and the string formula you are using in Filter Array.

    Thanks for your effort and time!

    Sincerely,

    Cliff | Microsoft Community Moderator

    0 comments No comments
  2. Anonymous
    2022-10-11T09:34:54+00:00

    Hello Cliff,

    Have you tested the flow in you environment .please update me if you found out any

    Thanks,

    Pragna .

    0 comments No comments
  3. Anonymous
    2022-10-08T06:48:06+00:00

    Thanks for your response . To answer your questions

    1. Attaching the snapshot of list column all the choice columns are single selection only. I also have a field with single text column which I have used as a combobox in powerapps which is multiselect one.

    1. URI

    3. Inside the condition

    formatDateTime(triggerOutputs()?['body/Created'],'dd-MM-yyyy hh:mm')

    formatDateTime(triggerOutputs()?['body/Modified'],'dd-MM-yyyy hh:mm') 4.Splitsplit(string(outputs('Get_changes_for_an_item_or_a_file_(properties_only)')?['body/ColumnHasChanged']),',')string string(':true')

    ColumName :

    json(item())

    ChangedFrom:

    body('Parse_JSON')?[json(item())]

    ChangedTo:

    triggerOutputs()?['body']?[json(item())]

    0 comments No comments
  4. Anonymous
    2022-10-08T07:12:22+00:00

    Dear Pragna,

    Thanks for your updates.

    I'll do a test in our environment and it may take some time. I'll update here as quick as I can.

    Thanks for your understanding and have a nice day!

    Sincerely,

    Cliff | Microsoft Community Moderator

    0 comments No comments