cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

PA seeing array as object

Hello,

I've seen a few posts on here about object/array conversions, but so far none have worked for me. This particular api is bringing in an array of objects (broken up by [ ]) but PA still reads as object. Not sure how to split this up so that PA will see the array and I can do an apply to each.

 

Here is a copy of the part of the code with the full object. 

 

 

 

 

[
    {
        "key": "RecordCategoryIdentifier",
        "type": "StringType",
        "value": "EML-99"
    },
    {
        "key": "RecordCategory",
        "type": "StringType",
        "value": "EML-99: Other"
    },
    {
        "key": "DispositionAuthority",
        "type": "StringType",
        "value": "North Systems Enterprise Retention Schedule"
    },
    {
        "key": "ContentVersion",
        "type": "StringType",
        "value": "1.0"
    },
    {
        "key": "Author",
        "type": "StringType",
        "value": "David.Whitehead@recordpoint.com"
    },
    {
        "key": "SourceCreatedBy",
        "type": "StringType",
        "value": "David Whitehead <David.Whitehead@recordpoint.com>"
    },
    {
        "key": "BarcodeValue",
        "type": "StringType",
        "value": ""
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|FileLeafRef",
        "type": "StringType",
        "value": null
    },
    {
        "key": "DisposalApprovedBy",
        "type": "StringType",
        "value": null
    },
    {
        "key": "DisposalApprovedDate",
        "type": "StringType",
        "value": null
    },
    {
        "key": "DisposalApprovalComments",
        "type": "StringType",
        "value": null
    },
    {
        "key": "DisposalRequestedApprovers",
        "type": "StringType",
        "value": []
    },
    {
        "key": "DisposalComments",
        "type": "StringType",
        "value": null
    },
    {
        "key": "SourceCreatedDate",
        "type": "StringType",
        "value": "2021-12-23T19:21:21.0000000Z"
    },
    {
        "key": "SourceLastModifiedBy",
        "type": "StringType",
        "value": "David Whitehead <David.Whitehead@recordpoint.com>"
    },
    {
        "key": "SourceLastModifiedDate",
        "type": "StringType",
        "value": "2021-12-23T19:26:23.0000000Z"
    },
    {
        "key": "Location",
        "type": "StringType",
        "value": "https://outlook.office365.com/owa/?ItemID=AAMkADA5NTU4ZTU3LTNjY2QtNGIzZi05ODFkLTNhMzc4MTUyNmJkZABGAAAAAACMpkaS11%2FNTqTLtvmiWnQzBwAjP%2FxRBovaQqMvXweXdYchAAAAAAEMAAAjP%2FxRBovaQqMvXweXdYchAAMAlkH5AAA%3D&exvsurl=1&viewmodel=ReadMessageItem"
    },
    {
        "key": "MediaType",
        "type": "StringType",
        "value": "Electronic"
    },
    {
        "key": "Title",
        "type": "StringType",
        "value": "File-Plan Import Scripts"
    },
    {
        "key": "Format",
        "type": "StringType",
        "value": "Email message"
    },
    {
        "key": "MimeType",
        "type": "StringType",
        "value": "text/html"
    },
    {
        "key": "OriginatingOrganization",
        "type": "StringType",
        "value": "North Systems"
    },
    {
        "key": "ItemTypeId",
        "type": "NumericalType",
        "value": 0
    },
    {
        "key": "ContentSource",
        "type": "StringType",
        "value": "Exchange Online"
    },
    {
        "key": "CreatedBy",
        "type": "StringType",
        "value": "Exchange Online Connector"
    },
    {
        "key": "CreatedDate",
        "type": "StringType",
        "value": "2021-12-23T19:21:40.0000000Z"
    },
    {
        "key": "ItemNumber",
        "type": "StringType",
        "value": "R0000004528"
    },
    {
        "key": "LastModifiedBy",
        "type": "StringType",
        "value": "dw@north.systems"
    },
    {
        "key": "LastModifiedDate",
        "type": "StringType",
        "value": "2022-02-04T19:50:30.0000000Z"
    },
    {
        "key": "NextDisposalAction",
        "type": "StringType",
        "value": "DestroyType"
    },
    {
        "key": "NextDisposalDate",
        "type": "StringType",
        "value": "2021-12-30T19:21:21.0000000Z"
    },
    {
        "key": "PreviousDisposalDate",
        "type": "StringType",
        "value": null
    },
    {
        "key": "PreviousDisposalAction",
        "type": "StringType",
        "value": null
    },
    {
        "key": "PreviousDisposalBy",
        "type": "StringType",
        "value": null
    },
    {
        "key": "Status",
        "type": "StringType",
        "value": "Managed"
    },
    {
        "key": "ConnectorDisplayName",
        "type": "StringType",
        "value": "Exchange Online Connector"
    },
    {
        "key": "VitalRecord",
        "type": "BooleanType",
        "value": false
    },
    {
        "key": "SecurityProfileIdentifier",
        "type": "StringType",
        "value": null
    },
    {
        "key": "UniqueExternalId",
        "type": "StringType",
        "value": "822371e2-89f8-4cdf-bdd6-43591ea2dfe5-ME3PR01MB8451B87F9DEA37CF85811E47EB7E9-ME3PR01MB8451.ausprd01.prod.outlook.com-.e08b4624-f7e6-4bdc-8a6f-a1806e4e200e"
    },
    {
        "key": "ClassificationType",
        "type": "NumericalType",
        "value": 4
    },
    {
        "key": "IsOnHold",
        "type": "BooleanType",
        "value": false
    },
    {
        "key": "LastExportedDate",
        "type": "StringType",
        "value": null
    },
    {
        "key": "LastExportedBy",
        "type": "StringType",
        "value": null
    },
    {
        "key": "LastExportedFormat",
        "type": "StringType",
        "value": null
    },
    {
        "key": "ConnectorId",
        "type": "StringType",
        "value": "e08b4624-f7e6-4bdc-8a6f-a1806e4e200e"
    },
    {
        "key": "DisposalApprovalStatus",
        "type": "StringType",
        "value": null
    },
    {
        "key": "Transition",
        "type": "StringType",
        "value": "None"
    },
    {
        "key": "SuggestedCategory",
        "type": "StringType",
        "value": "EML-01: Microsoft"
    },
    {
        "key": "SuggestedCategoryIdentifier",
        "type": "StringType",
        "value": "EML-01"
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|DateTime|Created",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|DateTime|Modified",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|DateTime|nsDocumentDate",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|Double|nsInvoiceValue",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|ContentTypeName",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|FileDirRef",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|FileRef",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|LibraryName",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|ListUrl",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|SiteName",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|SiteUrl",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|Title",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|WebUrl",
        "type": "StringType",
        "value": null
    },
    {
        "key": "PredictionProbability",
        "type": "NumericalType",
        "value": 0.624110895276128
    },
    {
        "key": "SentForDisposalApprovalDate",
        "type": "StringType",
        "value": null
    },
    {
        "key": "ItemSubTypeId",
        "type": "StringType",
        "value": null
    },
    {
        "key": "MlExperimentId",
        "type": "StringType",
        "value": "81320264-3379-11ec-8ad1-ea3f0992e784"
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|aluRecordClass",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|aluRecordClass (TermPath)",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|dad16653-9516-40fa-993a-d3d51706bb8d|DateTime|aluRecordEventDate",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|80283930-42e0-4c5a-b3a0-ce213951ce56|String|FileExtension",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|80283930-42e0-4c5a-b3a0-ce213951ce56|String|Author",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|80283930-42e0-4c5a-b3a0-ce213951ce56|String|Modified By",
        "type": "StringType",
        "value": null
    },
    {
        "key": "HoldId",
        "type": "StringType",
        "value": []
    },
    {
        "key": "S|424548d6-4d1a-4a7f-8879-05e067f47773|String|ProfileName",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|424548d6-4d1a-4a7f-8879-05e067f47773|DateTime|Date From",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|424548d6-4d1a-4a7f-8879-05e067f47773|DateTime|Date To",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|424548d6-4d1a-4a7f-8879-05e067f47773|String|Department",
        "type": "StringType",
        "value": null
    },
    {
        "key": "NapDeleteId",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|424548d6-4d1a-4a7f-8879-05e067f47773|DateTime|Record Trigger Date",
        "type": "StringType",
        "value": null
    },
    {
        "key": "S|424548d6-4d1a-4a7f-8879-05e067f47773|DateTime|Next Review Date",
        "type": "StringType",
        "value": null
    },
    {
        "key": "BinaryStateId",
        "type": "NumericalType",
        "value": 0
    },
    {
        "key": "groups",
        "type": "StringType",
        "value": []
    },
    {
        "key": "users",
        "type": "StringType",
        "value": []
    },
    {
        "key": "IconUrl",
        "type": "StringType",
        "value": "https://usw.records365.com/assets/img/exchangeonline colour icon.png"
    },
    {
        "key": "ConnectorIsCustom",
        "type": "BooleanType",
        "value": false
    }
]

 

 

 

30 REPLIES 30

Hi, @Anonymous, not to undo any of the stuff you're doing with @Pstork1, as you might prefer the methods taken there, but I thought I'd take a pop at this, too.

 

Here's a method I've done without any Apply to each loops, which leans on using multiple Select actions and a bit of creative expression usage within.

 

I've also added some checks to the process, and I would keep these in, whether you're sure that there's 83 or not. What this does is it allows the input to grow if fields are added to those items arrays. If you're certain, though, that all the 83 (or more) are input each time, then you can remove the filter and condition steps, and just run the yes branch as main.

 

Here's my solution ...

 

Selecting EEEEVVVERRRRYYYYYYONEEEEE [GaryOldman.gif]

OK, here's the image, and I'll edit in a breakdown in a second, but you can see the results afterward.

0 - The Flow.jpg

 

The first constant in there, objCNST, is just the demo data that you gave me.

 

Checks

These checks are optional, if you don't need to ensure each of the items has (at current count) 83 properties items of its own, then you can remove the filter step, and move all of the yes branch items out of the condition and delete the condition.

 

However the Select items and itemsSubCountCNST should stay, because what they do is allow your process to grow with time. Let's say more properties are added to the items inputs, like, I dunno, a "QRCodeNo" field. This puts the number up, and would mean you need to edit the flow.

Select items

This creates an array with the number of sub-items in each of the 'items' array ... items!

01 - Select items.jpg

Field Expression
From:
outputs('objCNST')?['items']
Map:
length(item())

itemsSubCountCNST

This simply selects the maximum number from the previous step, using the below expression:

02 - itemsSubCountCNST.jpg
max(body('Select_items'))

Filter items to those with a full compliment

Does as per the note:

03 - Filter items to those with a full compliment.jpg

Field Expression
From:
@body('Select_items')
Adv:
@equals(item(), outputs('itemsSubCountCNST'))

 

Condition

Described in the note:

04 - Condition.jpg
length(outputs('objCNST')?['items'])
is equal to
length(body('Filter_items_to_those_with_a_full_compliment'))

 

If no

Here you could add an email to warn you that the flow failed due to incorrect items being sent in, the Terminate action here is a failure action.

 

If yes

Again, you can extract this to the main flow if checks on the inputs are done prior to being sent.

 

itemsCNST

This joins each of the items in the original items array.

05 - itemsCNST.jpg
json(
    replace(
        join(
            outputs('objCNST')?['items'], 
            'j01n3r'
        ), 
        ']j01n3r[', 
        ','
    )
)
  1. join() - Creates a string joining each item with the text 'aaa'.
  2. replace() - Replaces each instance of ']aaa[' with a comma.
  3. json() - Makes this valid json for the next step

This results in one long list of all of the sub-items from each main item.

 

Select properJsons

This step takes the new list of everything, and gets the 'key' and 'value' for each item, creating valid objects for each of them with accurate data.

06 - properJsons.jpg

From:
@{outputs('itemsCNST')}
Map:
Key Value
item()?['key']
item()?['value']

 

Select finalMakeUp

Here this does a bit of a dance (because nothing is ever easy) which is similar to what is done in itemsCNST.

07 - Select finalMakeUp.jpg

From:
range(
    0, 
    length(outputs('objCNST')?['items'])
)
Map:
json(
    replace(
        join(
            take(
                skip(
                    body('Select_properJsons'), 
                    mul(
                        item(), 
                        outputs('itemsSubCountCNST')
                    )
                ), 
                outputs('itemsSubCountCNST')
            ),
            'j01n3r'
        ), 
        '}j01n3r{', 
        ','
    )
)

What's different here is the iterative nature created by the range() function, allow you to loop through sets of data. Looking first at how that From is constructed:

  1. length() - This calculates how many items are in an array, or how many characters are in a string of text.
  2. range() - This returns a simple array of numbers from the one defined before the comma, to the one defined after it. Here that second number is the number of items.

So now there is an array of numbers that essentially counts through each of the items in the items array, with that in mind, here's how that is used in the Map:

  1. mul() - This multiplies a number by another, in this case that max() calculation done earlier, by the number given back for this particular item in the range that's been made.
  2. skip() - This omits the first count of items from an array, in this case that's defined by the mul(), which on the first iteration will be zero, the second 83, the third 166, etc.
  3. take() - This creates a new array with from the array before the comma, to the count of what is defined in the second, here that being 83. So you can see on the second range item it will be taking from items 83 to 166 or something.
  4. join(), replace(), json() - This is the same as the itemsCNST.

 

newObjCNST

Finally, this object can replace the original (which it does) by replacing the value of the 'items' field with what you've built in Select finalMakeUp!

08 - newObjCNST.jpg
setProperty(
    outputs('objCNST'), 
    'items', 
    body('Select_finalMakeUp')
)

 

You can see the final, polished result of this flow in the JSON contained within the below spoiler:

Spoiler
{
  "duration": 112,
  "pageIndex": 0,
  "pageSize": 30,
  "count": 30,
  "totalCount": 36,
  "countPerformed": true,
  "hasMoreItems": true,
  "items": [
    {
      "RecordCategoryIdentifier": "EML-99",
      "RecordCategory": "EML-99: Other",
      "DispositionAuthority": "North Systems Enterprise Retention Schedule",
      "ContentVersion": "1.0",
      "Author": "David.Whitehead@recordpoint.com",
      "SourceCreatedBy": "David Whitehead <David.Whitehead@recordpoint.com>",
      "BarcodeValue": "",
      "DisposalApprovedBy": null,
      "DisposalApprovedDate": null,
      "DisposalApprovalComments": null,
      "DisposalRequestedApprovers": [],
      "DisposalComments": null,
      "SourceCreatedDate": "2021-12-23T19:21:21.0000000Z",
      "SourceLastModifiedBy": "David Whitehead <David.Whitehead@recordpoint.com>",
      "SourceLastModifiedDate": "2021-12-23T19:26:23.0000000Z",
      "Location": "https://outlook.office365.com/owa/?ItemID=AAMkADA5NTU4ZTU3LTNjY2QtNGIzZi05ODFkLTNhMzc4MTUyNmJkZABGAAAAAACMpkaS11%2FNTqTLtvmiWnQzBwAjP%2FxRBovaQqMvXweXdYchAAAAAAEMAAAjP%2FxRBovaQqMvXweXdYchAAMAlkH5AAA%3D&exvsurl=1&viewmodel=ReadMessageItem",
      "MediaType": "Electronic",
      "Title": "File-Plan Import Scripts",
      "Format": "Email message",
      "MimeType": "text/html",
      "OriginatingOrganization": "North Systems",
      "ItemTypeId": 0,
      "ContentSource": "Exchange Online",
      "CreatedBy": "Exchange Online Connector",
      "CreatedDate": "2021-12-23T19:21:40.0000000Z",
      "ItemNumber": "R0000004528",
      "LastModifiedBy": "dw@north.systems",
      "LastModifiedDate": "2022-02-04T19:50:30.0000000Z",
      "NextDisposalAction": "DestroyType",
      "NextDisposalDate": "2021-12-30T19:21:21.0000000Z",
      "PreviousDisposalDate": null,
      "PreviousDisposalAction": null,
      "PreviousDisposalBy": null,
      "Status": "Managed",
      "ConnectorDisplayName": "Exchange Online Connector",
      "VitalRecord": false,
      "SecurityProfileIdentifier": null,
      "UniqueExternalId": "822371e2-89f8-4cdf-bdd6-43591ea2dfe5-ME3PR01MB8451B87F9DEA37CF85811E47EB7E9-ME3PR01MB8451.ausprd01.prod.outlook.com-.e08b4624-f7e6-4bdc-8a6f-a1806e4e200e",
      "ClassificationType": 4,
      "IsOnHold": false,
      "LastExportedDate": null,
      "LastExportedBy": null,
      "LastExportedFormat": null,
      "ConnectorId": "e08b4624-f7e6-4bdc-8a6f-a1806e4e200e",
      "DisposalApprovalStatus": null,
      "Transition": "None",
      "SuggestedCategory": "EML-01: Microsoft",
      "SuggestedCategoryIdentifier": "EML-01",
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|DateTime|Modified": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|DateTime|nsDocumentDate": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|Double|nsInvoiceValue": null,
      "PredictionProbability": 0.624110895276128,
      "SentForDisposalApprovalDate": null,
      "ItemSubTypeId": null,
      "MlExperimentId": "81320264-3379-11ec-8ad1-ea3f0992e784",
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|aluRecordClass": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|aluRecordClass (TermPath)": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|DateTime|aluRecordEventDate": null,
      "S|80283930-42e0-4c5a-b3a0-ce213951ce56|String|FileExtension": null,
      "S|80283930-42e0-4c5a-b3a0-ce213951ce56|String|Author": null,
      "S|80283930-42e0-4c5a-b3a0-ce213951ce56|String|Modified By": null,
      "HoldId": [],
      "S|424548d6-4d1a-4a7f-8879-05e067f47773|DateTime|Date From": null,
      "S|424548d6-4d1a-4a7f-8879-05e067f47773|DateTime|Date To": null,
      "S|424548d6-4d1a-4a7f-8879-05e067f47773|String|Department": null,
      "NapDeleteId": null,
      "S|424548d6-4d1a-4a7f-8879-05e067f47773|DateTime|Record Trigger Date": null,
      "S|424548d6-4d1a-4a7f-8879-05e067f47773|DateTime|Next Review Date": null,
      "BinaryStateId": 0,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|FileLeafRef": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|DateTime|Created": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|ContentTypeName": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|FileDirRef": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|FileRef": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|LibraryName": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|ListUrl": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|SiteName": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|SiteUrl": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|Title": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|WebUrl": null,
      "S|424548d6-4d1a-4a7f-8879-05e067f47773|String|ProfileName": null,
      "IconUrl": "https://usw.records365.com/assets/img/exchangeonline colour icon.png",
      "ConnectorIsCustom": false
    },
    {
      "RecordCategoryIdentifier": "EML-04",
      "RecordCategory": "EML-04: RecordPoint",
      "DispositionAuthority": "North Systems Enterprise Retention Schedule",
      "ContentVersion": "1.0",
      "Author": "David.Whitehead@recordpoint.com",
      "SourceCreatedBy": "David Whitehead <David.Whitehead@recordpoint.com>",
      "BarcodeValue": "",
      "DisposalApprovedBy": null,
      "DisposalApprovedDate": null,
      "DisposalApprovalComments": null,
      "DisposalRequestedApprovers": [],
      "DisposalComments": null,
      "SourceCreatedDate": "2021-12-15T19:57:06.0000000Z",
      "SourceLastModifiedBy": "David Whitehead <David.Whitehead@recordpoint.com>",
      "SourceLastModifiedDate": "2021-12-15T20:02:08.0000000Z",
      "Location": "https://outlook.office365.com/owa/?ItemID=AAMkAGMwMWU1YWZjLTUxYWYtNDYyMi1hOGFiLWMwMDMxNzJmZjAwNgBGAAAAAACBtcDBUxxJR72rnf2aSwMlBwBTZBpTyit7QIXZn4e4zS4CAAAAAAEMAABTZBpTyit7QIXZn4e4zS4CAAKQJdFEAAA%3D&exvsurl=1&viewmodel=ReadMessageItem",
      "MediaType": "Electronic",
      "Title": "Records365 Disposal Approval Request",
      "Format": "Email message",
      "MimeType": "text/html",
      "OriginatingOrganization": "North Systems",
      "ItemTypeId": 0,
      "ContentSource": "Exchange Online",
      "CreatedBy": "Exchange Online Connector",
      "CreatedDate": "2021-12-15T19:57:32.0000000Z",
      "ItemNumber": "R0000004521",
      "LastModifiedBy": "dw@north.systems",
      "LastModifiedDate": "2022-02-04T19:50:56.0000000Z",
      "NextDisposalAction": "DestroyType",
      "NextDisposalDate": "2021-12-22T19:57:06.0000000Z",
      "PreviousDisposalDate": null,
      "PreviousDisposalAction": null,
      "PreviousDisposalBy": null,
      "Status": "Managed",
      "ConnectorDisplayName": "Exchange Online Connector",
      "VitalRecord": false,
      "SecurityProfileIdentifier": null,
      "UniqueExternalId": "cd774661-7aca-4ffe-b291-b60cdbcd9928-SY6PR01MB8444B4708C337FE7A070AB7BEB769-SY6PR01MB8444.ausprd01.prod.outlook.com-.e08b4624-f7e6-4bdc-8a6f-a1806e4e200e",
      "ClassificationType": 3,
      "IsOnHold": false,
      "LastExportedDate": null,
      "LastExportedBy": null,
      "LastExportedFormat": null,
      "ConnectorId": "e08b4624-f7e6-4bdc-8a6f-a1806e4e200e",
      "DisposalApprovalStatus": null,
      "Transition": "None",
      "SuggestedCategory": "EML-04: RecordPoint",
      "SuggestedCategoryIdentifier": "EML-04",
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|DateTime|Modified": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|DateTime|nsDocumentDate": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|Double|nsInvoiceValue": null,
      "PredictionProbability": 0.936232769368043,
      "SentForDisposalApprovalDate": null,
      "ItemSubTypeId": null,
      "MlExperimentId": "81320264-3379-11ec-8ad1-ea3f0992e784",
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|aluRecordClass": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|aluRecordClass (TermPath)": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|DateTime|aluRecordEventDate": null,
      "S|80283930-42e0-4c5a-b3a0-ce213951ce56|String|FileExtension": null,
      "S|80283930-42e0-4c5a-b3a0-ce213951ce56|String|Author": null,
      "S|80283930-42e0-4c5a-b3a0-ce213951ce56|String|Modified By": null,
      "HoldId": [],
      "S|424548d6-4d1a-4a7f-8879-05e067f47773|DateTime|Date From": null,
      "S|424548d6-4d1a-4a7f-8879-05e067f47773|DateTime|Date To": null,
      "S|424548d6-4d1a-4a7f-8879-05e067f47773|String|Department": null,
      "NapDeleteId": null,
      "S|424548d6-4d1a-4a7f-8879-05e067f47773|DateTime|Record Trigger Date": null,
      "S|424548d6-4d1a-4a7f-8879-05e067f47773|DateTime|Next Review Date": null,
      "BinaryStateId": 0,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|FileLeafRef": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|DateTime|Created": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|ContentTypeName": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|FileDirRef": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|FileRef": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|LibraryName": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|ListUrl": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|SiteName": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|SiteUrl": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|Title": null,
      "S|dad16653-9516-40fa-993a-d3d51706bb8d|String|WebUrl": null,
      "S|424548d6-4d1a-4a7f-8879-05e067f47773|String|ProfileName": null,
      "IconUrl": "https://usw.records365.com/assets/img/exchangeonline colour icon.png",
      "ConnectorIsCustom": false
    }
  ]
}
Anonymous
Not applicable

Thanks @Pstork1 I went that direction prior to your reply and I "think" I'm close. I'm pulling in 30 responses for the outer array which equals the exact number of items the query pulls in.

Anonymous
Not applicable

Thanks @eliotcole ! 

 

I'm going to give this one a shot this afternoon.

 

With @Pstork1 solution, I'm able to get to apply to each loops working for the items (30) and properties within the items (83) but it's still only giving me the first item and repeating it 30 times. Probably something I'm doing, but I know I'm close.

Anonymous
Not applicable

@eliotcole I got down to the "ItemsCNST" and "SelectProperJsons" actions and run into a hiccup.

 

Seems like after the "ItemsCNST" it does not pick up any 'key' or 'value' to select, and the expression does not work. 

Huh ... that's odd.

 

Remember, your main source of data may not be called objCNST, so if you still have that in your expressions, and you're supposed to be looking at where that original items array is, then it won't pick it up correctly.

 

Think of it this way YOUR_DATA will have an items array field that looks like this:

[
	{
		"key": "RecordCategoryIdentifier",
		"type": "StringType",
		"value": "EML-99"
	},
	{
		"key": "RecordCategory",
		"type": "StringType",
		"value": "EML-99: Other"
	}, ...
]

 

So any call to get that will be something LIKE this for the whole array:

YOUR_DATA_CALL?['items']

... and like this for a specific item (eg. 13) in that array:

YOUR_DATA_CALL?['items'][13]

I said 'like' so prominently as you will have to work out what that call is.

Anonymous
Not applicable

@eliotcole 

First of all, THANK YOU. I've gotten all the way down to a successful creation of a CSV file that iterates through all 30 items pulled from the query and shows all properties in separate columns.

 

What I'm doing is essentially after the FINAL Parse JSON action I'm loading all results into an array variable, then load that into a CSV file.

 

This works fine, but my question is: Rather than using 'Automatic' columns, how would I change to 'Custom' and select the columns that I want to use? Hope this makes sense.

Well, obviously that's out of scope from the original question ( 😉 ) but I would advise against doing it as a part of *this* flow, so that you can keep the data pure and ensure that it's usable in whatever format it's needed wherever.

 

Also, it kind of doesn't matter. Because wherever that data goes, you would only use what you want from it.

 

All that said ( 😉 ) ... you could create a 'bespoke data' Scope, which will process any bespoke data for you, keeping it obviously away from the rest.

 

So, if you wanted to incorporate only, say, the 'Author', 'Location', and 'ItemNumber' key/value pairs, then you could just:

  1. Add the Scope after the Condition
  2. Make the first entry another Select action where the From field is Select finalMakeUp
  3. Then add another Compose action called ... I dunno, authyLocItNumCNST ( 😅 ) that does the same thing as newObjCNST. Then use that.

Boomy McBoomster, innit. 👍

 

Thanks for the solution, @Anonymous ... would you be OK with me adding the main instructional message as the solution, too? Also, maybe Mr. Stork's one? I'm happy to do so on your behalf!

Anonymous
Not applicable

Sounds good to me!

Anonymous
Not applicable

@eliotcole @Pstork1 

 

Hi all. I have come across yet another roadblock in the construction of this PA flow.

 

When the call returns multiple items, I'm stuck at the 30 items per page issue. So the only way to get around that is to increase the pagesize propery to the max of 1000. But, if it returns MORE than 1,000 items (which it does often) those items are not there. 

 

There's no getting around the 1,000 limit, so the only solution has to be pagination. There is a 'pagenumber' property but I don't see a way to make that an array for the api call to get multiple results. And when I turn on 'pagination' for the api call I get the following:

 

"The response is not a valid paginated response. The paginated response is missing a property 'value' of type array."

 

Do you know of any way to loop through all items within the call itself? Once it gets to Parse JSON it's too late.

 

Thanks

Hi, @Anonymous ...

 

Again, no need to loop, once all the pages have returned, then union() them into one array, and run off of that.

 

PM me what the returned pagination result looks like and I'll show you ... but really I think you can figure this out, mate, with just some testing.

 

However, if this is still an issue after trying that, then this should be raised as a new issue, really. 😉

 

( if only to give @Pstork1 or me the opportunity at another tasty solution 🤑 ... but, yeah, if you do raise a new one, make sure you refer to this one, and show the flow, and give sample data in the question 👍 )

Helpful resources

Announcements

Take a short Community User Survey | Help us make your experience better!

To ensure that we are providing the best possible experience for Community members, we want to hear from you!    We value your feedback! As part of our commitment to enhancing your experience, we invite you to participate in a brief 15-question survey. Your insights will help us improve our services and better serve the community.    👉Community User Survey    Thank you for being an essential part of our community!    Power Platform Engagement Team  

Tuesday Tip | How to Get Community Support

It's time for another Tuesday Tip, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.       This Week: All About Community Support Whether you're a seasoned community veteran or just getting started, you may need a bit of help from time to time! If you need to share feedback with the Community Engagement team about the community or are looking for ways we can assist you with user groups, events, or something else, Community Support is the place to start.   Community Support is part of every one of our communities, accessible to all our community members.   Within each community's Community Support page, you'll find three distinct areas, each with a different focus to help you when you need support from us most. Power Apps: https://powerusers.microsoft.com/t5/Community-Support/ct-p/pa_community_support Power Automate: https://powerusers.microsoft.com/t5/Community-Support/ct-p/mpa_community_support Power Pages: https://powerusers.microsoft.com/t5/Community-Support/ct-p/mpp_community_support Copilot Studio: https://powerusers.microsoft.com/t5/Community-Support/ct-p/pva_community-support   Community Support Form If you need more assistance, you can reach out to the Community Team via the Community support form. Choose the type of support you require and fill in the form accordingly. We will respond to you promptly.    Thank you for being an active part of our community. Your contributions make a difference!   Best Regards, The Community Management Team

Community Roundup: A Look Back at Our Last 10 Tuesday Tips

As we continue to grow and learn together, it's important to reflect on the valuable insights we've shared. For today's #TuesdayTip, we're excited to take a moment to look back at the last 10 tips we've shared in case you missed any or want to revisit them. Thanks for your incredible support for this series--we're so glad it was able to help so many of you navigate your community experience!   Getting Started in the Community An overview of everything you need to know about navigating the community on one page!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Ranks and YOU Have you ever wondered how your fellow community members ascend the ranks within our community? We explain everything about ranks and how to achieve points so you can climb up in the rankings! Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Powering Up Your Community Profile Your Community User Profile is how the Community knows you--so it's essential that it works the way you need it to! From changing your username to updating contact information, this Knowledge Base Article is your best resource for powering up your profile. Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Blogs--A Great Place to Start There's so much you'll discover in the Community Blogs, and we hope you'll check them out today!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Unlocking Community Achievements and Earning Badges Across the Communities, you'll see badges on users profile that recognize and reward their engagement and contributions. Check out some details on Community badges--and find out more in the detailed link at the end of the article! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Blogging in the Community Interested in blogging? Everything you need to know on writing blogs in our four communities! Get started blogging across the Power Platform communities today! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Subscriptions & Notifications We don't want you to miss a thing in the community! Read all about how to subscribe to sections of our forums and how to setup your notifications! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Getting Started with Private Messages & Macros Do you want to enhance your communication in the Community and streamline your interactions? One of the best ways to do this is to ensure you are using Private Messaging--and the ever-handy macros that are available to you as a Community member! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Community User Groups Learn everything about being part of, starting, or leading a User Group in the Power Platform Community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Update Your Community Profile Today! Keep your community profile up to date which is essential for staying connected and engaged with the community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Thank you for being an integral part of our journey.   Here's to many more Tuesday Tips as we pave the way for a brighter, more connected future! As always, watch the News & Announcements for the next set of tips, coming soon!    

Calling all User Group Leaders and Super Users! Mark Your Calendars for the next Community Ambassador Call on May 9th!

This month's Community Ambassador call is on May 9th at 9a & 3p PDT. Please keep an eye out in your private messages and Teams channels for your invitation. There are lots of exciting updates coming to the Community, and we have some exclusive opportunities to share with you! As always, we'll also review regular updates for User Groups, Super Users, and share general information about what's going on in the Community.     Be sure to register & we hope to see all of you there!

April 2024 Community Newsletter

We're pleased to share the April Community Newsletter, where we highlight the latest news, product releases, upcoming events, and the amazing work of our outstanding Community members.   If you're new to the Community, please make sure to follow the latest News & Announcements and check out the Community on LinkedIn as well! It's the best way to stay up-to-date with all the news from across Microsoft Power Platform and beyond.    COMMUNITY HIGHLIGHTS   Check out the most active community members of the last month! These hardworking members are posting regularly, answering questions, kudos, and providing top solutions in their communities. We are so thankful for each of you--keep up the great work! If you hope to see your name here next month, follow these awesome community members to see what they do!   Power AppsPower AutomateCopilot StudioPower PagesWarrenBelzDeenujialexander2523ragavanrajanLaurensMManishSolankiMattJimisonLucas001AmikcapuanodanilostephenrobertOliverRodriguestimlAndrewJManikandanSFubarmmbr1606VishnuReddy1997theMacResolutionsVishalJhaveriVictorIvanidzejsrandhawahagrua33ikExpiscornovusFGuerrero1PowerAddictgulshankhuranaANBExpiscornovusprathyooSpongYeNived_Nambiardeeksha15795apangelesGochixgrantjenkinsvasu24Mfon   LATEST NEWS   Business Applications Launch Event - On Demand In case you missed the Business Applications Launch Event, you can now catch up on all the announcements and watch the entire event on-demand inside Charles Lamanna's latest cloud blog.   This is your one stop shop for all the latest Copilot features across Power Platform and #Dynamics365, including first-hand looks at how companies such as Lenovo, Sonepar, Ford Motor Company, Omnicom and more are using these new capabilities in transformative ways. Click the image below to watch today!   Power Platform Community Conference 2024 is here! It's time to look forward to the next installment of the Power Platform Community Conference, which takes place this year on 18-20th September 2024 at the MGM Grand in Las Vegas!   Come and be inspired by Microsoft senior thought leaders and the engineers behind the #PowerPlatform, with Charles Lamanna, Sangya Singh, Ryan Cunningham, Kim Manis, Nirav Shah, Omar Aftab and Leon Welicki already confirmed to speak. You'll also be able to learn from industry experts and Microsoft MVPs who are dedicated to bridging the gap between humanity and technology. These include the likes of Lisa Crosbie, Victor Dantas, Kristine Kolodziejski, David Yack, Daniel Christian, Miguel Félix, and Mats Necker, with many more to be announced over the coming weeks.   Click here to watch our brand-new sizzle reel for #PPCC24 or click the image below to find out more about registration. See you in Vegas!       Power Up Program Announces New Video-Based Learning Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram. These include a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the image below to find out more!   UPCOMING EVENTS Microsoft Build - Seattle and Online - 21-23rd May 2024 Taking place on 21-23rd May 2024 both online and in Seattle, this is the perfect event to learn more about low code development, creating copilots, cloud platforms, and so much more to help you unleash the power of AI.   There's a serious wealth of talent speaking across the three days, including the likes of Satya Nadella, Amanda K. Silver, Scott Guthrie, Sarah Bird, Charles Lamanna, Miti J., Kevin Scott, Asha Sharma, Rajesh Jha, Arun Ulag, Clay Wesener, and many more.   And don't worry if you can't make it to Seattle, the event will be online and totally free to join. Click the image below to register for #MSBuild today!   European Collab Summit - Germany - 14-16th May 2024 The clock is counting down to the amazing European Collaboration Summit, which takes place in Germany May 14-16, 2024. #CollabSummit2024 is designed to provide cutting-edge insights and best practices into Power Platform, Microsoft 365, Teams, Viva, and so much more. There's a whole host of experts speakers across the three-day event, including the likes of Vesa Juvonen, Laurie Pottmeyer, Dan Holme, Mark Kashman, Dona Sarkar, Gavin Barron, Emily Mancini, Martina Grom, Ahmad Najjar, Liz Sundet, Nikki Chapple, Sara Fennah, Seb Matthews, Tobias Martin, Zoe Wilson, Fabian Williams, and many more.   Click the image below to find out more about #ECS2024 and register today!     Microsoft 365 & Power Platform Conference - Seattle - 3-7th June If you're looking to turbo boost your Power Platform skills this year, why not take a look at everything TechCon365 has to offer at the Seattle Convention Center on June 3-7, 2024.   This amazing 3-day conference (with 2 optional days of workshops) offers over 130 sessions across multiple tracks, alongside 25 workshops presented by Power Platform, Microsoft 365, Microsoft Teams, Viva, Azure, Copilot and AI experts. There's a great array of speakers, including the likes of Nirav Shah, Naomi Moneypenny, Jason Himmelstein, Heather Cook, Karuana Gatimu, Mark Kashman, Michelle Gilbert, Taiki Y., Kristi K., Nate Chamberlain, Julie Koesmarno, Daniel Glenn, Sarah Haase, Marc Windle, Amit Vasu, Joanne C Klein, Agnes Molnar, and many more.   Click the image below for more #Techcon365 intel and register today!     For more events, click the image below to visit the Microsoft Community Days website.      

Tuesday Tip | Update Your Community Profile Today!

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   We're excited to announce that updating your community profile has never been easier! Keeping your profile up to date is essential for staying connected and engaged with the community.   Check out the following Support Articles with these topics: Accessing Your Community ProfileRetrieving Your Profile URLUpdating Your Community Profile Time ZoneChanging Your Community Profile Picture (Avatar)Setting Your Date Display Preferences Click on your community link for more information: Power Apps, Power Automate, Power Pages, Copilot Studio   Thank you for being an active part of our community. Your contributions make a difference! Best Regards, The Community Management Team

Users online (3,658)