cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CaseyRhodes
Helper I
Helper I

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, @CaseyRhodes, 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
    }
  ]
}

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.

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.

@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.

@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, @CaseyRhodes ... 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!

Sounds good to me!

@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, @CaseyRhodes ...

 

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

Exclusive LIVE Community Event: Power Apps Copilot Coffee Chat with Copilot Studio Product Team

It's time for the SECOND Power Apps Copilot Coffee Chat featuring the Copilot Studio product team, which will be held LIVE on April 3, 2024 at 9:30 AM Pacific Daylight Time (PDT).     This is an incredible opportunity to connect with members of the Copilot Studio product team and ask them anything about Copilot Studio. We'll share our special guests with you shortly--but we want to encourage to mark your calendars now because you will not want to miss the conversation.   This live event will give you the unique opportunity to learn more about Copilot Studio plans, where we’ll focus, and get insight into upcoming features. We’re looking forward to hearing from the community, so bring your questions!   TO GET ACCESS TO THIS EXCLUSIVE AMA: Kudo this post to reserve your spot! Reserve your spot now by kudoing this post.  Reservations will be prioritized on when your kudo for the post comes through, so don't wait! Click that "kudo button" today.   Invitations will be sent on April 2nd.Users posting Kudos after April 2nd at 9AM PDT may not receive an invitation but will be able to view the session online after conclusion of the event. Give your "kudo" today and mark your calendars for April 3, 2024 at 9:30 AM PDT and join us for an engaging and informative session!

Tuesday Tip: Unlocking Community Achievements and Earning Badges

TUESDAY TIPS are our way of communicating helpful things we've learned or shared that have helped members of the Community. Whether you're just getting started or you're a seasoned pro, Tuesday Tips will help you know where to go, what to look for, and navigate your way through the ever-growing--and ever-changing--world of the Power Platform Community! We cover basics about the Community, provide a few "insider tips" to make your experience even better, and share best practices gleaned from our most active community members and Super Users.   With so many new Community members joining us each week, we'll also review a few of our "best practices" so you know just "how" the Community works, so make sure to watch the News & Announcements each week for the latest and greatest Tuesday Tips!     THIS WEEK'S TIP: Unlocking Achievements and Earning BadgesAcross the Communities, you'll see badges on users profile that recognize and reward their engagement and contributions. These badges each signify a different achievement--and all of those achievements are available to any Community member! If you're a seasoned pro or just getting started, you too can earn badges for the great work you do. Check out some details on Community badges below--and find out more in the detailed link at the end of the article!       A Diverse Range of Badges to Collect The badges you can earn in the Community cover a wide array of activities, including: Kudos Received: Acknowledges the number of times a user’s post has been appreciated with a “Kudo.”Kudos Given: Highlights the user’s generosity in recognizing others’ contributions.Topics Created: Tracks the number of discussions initiated by a user.Solutions Provided: Celebrates the instances where a user’s response is marked as the correct solution.Reply: Counts the number of times a user has engaged with community discussions.Blog Contributor: Honors those who contribute valuable content and are invited to write for the community blog.       A Community Evolving Together Badges are not only a great way to recognize outstanding contributions of our amazing Community members--they are also a way to continue fostering a collaborative and supportive environment. As you continue to share your knowledge and assist each other these badges serve as a visual representation of your valuable contributions.   Find out more about badges in these Community Support pages in each Community: All About Community Badges - Power Apps CommunityAll About Community Badges - Power Automate CommunityAll About Community Badges - Copilot Studio CommunityAll About Community Badges - Power Pages Community

Tuesday Tips: Powering Up Your Community Profile

TUESDAY TIPS are our way of communicating helpful things we've learned or shared that have helped members of the Community. Whether you're just getting started or you're a seasoned pro, Tuesday Tips will help you know where to go, what to look for, and navigate your way through the ever-growing--and ever-changing--world of the Power Platform Community! We cover basics about the Community, provide a few "insider tips" to make your experience even better, and share best practices gleaned from our most active community members and Super Users.   With so many new Community members joining us each week, we'll also review a few of our "best practices" so you know just "how" the Community works, so make sure to watch the News & Announcements each week for the latest and greatest Tuesday Tips!   This Week's Tip: Power Up Your Profile!  🚀 It's where every Community member gets their start, and it's essential that you keep it updated! Your Community User Profile is how you're able to get messages, post solutions, ask questions--and as you rank up, it's where your badges will appear and how you'll be known when you start blogging in the Community Blog. 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.     Password Puzzles? No Problem! Find out how to sync your Azure AD password with your community account, ensuring a seamless sign-in. No separate passwords to remember! Job Jumps & Email Swaps Changed jobs? Got a new email? Fear not! You'll find out how to link your shiny new email to your existing community account, keeping your contributions and connections intact. Username Uncertainties Unraveled Picking the perfect username is crucial--and sometimes the original choice you signed up with doesn't fit as well as you may have thought. There's a quick way to request an update here--but remember, your username is your community identity, so choose wisely. "Need Admin Approval" Warning Window? If you see this error message while using the community, don't worry. A simple process will help you get where you need to go. If you still need assistance, find out how to contact your Community Support team. Whatever you're looking for, when it comes to your profile, the Community Account Support Knowledge Base article is your treasure trove of tips as you navigate the nuances of your Community Profile. It’s the ultimate resource for keeping your digital identity in tip-top shape while engaging with the Power Platform Community. So, dive in and power up your profile today!  💪🚀   Community Account Support | Power Apps Community Account Support | Power AutomateCommunity Account Support | Copilot Studio  Community Account Support | Power Pages

Super User of the Month | Chris Piasecki

In our 2nd installment of this new ongoing feature in the Community, we're thrilled to announce that Chris Piasecki is our Super User of the Month for March 2024. If you've been in the Community for a while, we're sure you've seen a comment or marked one of Chris' helpful tips as a solution--he's been a Super User for SEVEN consecutive seasons!   Since authoring his first reply in April 2020 to his most recent achievement organizing the Canadian Power Platform Summit this month, Chris has helped countless Community members with his insights and expertise. In addition to being a Super User, Chris is also a User Group leader, Microsoft MVP, and a featured speaker at the Microsoft Power Platform Conference. His contributions to the new SUIT program, along with his joyous personality and willingness to jump in and help so many members has made Chris a fixture in the Power Platform Community.   When Chris isn't authoring solutions or organizing events, he's actively leading Piasecki Consulting, specializing in solution architecture, integration, DevOps, and more--helping clients discover how to strategize and implement Microsoft's technology platforms. We are grateful for Chris' insightful help in the Community and look forward to even more amazing milestones as he continues to assist so many with his great tips, solutions--always with a smile and a great sense of humor.You can find Chris in the Community and on LinkedIn. Thanks for being such a SUPER user, Chris! 💪 🌠  

Find Out What Makes Super Users So Super

We know many of you visit the Power Platform Communities to ask questions and receive answers. But do you know that many of our best answers and solutions come from Community members who are super active, helping anyone who needs a little help getting unstuck with Business Applications products? We call these dedicated Community members Super Users because they are the real heroes in the Community, willing to jump in whenever they can to help! Maybe you've encountered them yourself and they've solved some of your biggest questions. Have you ever wondered, "Why?"We interviewed several of our Super Users to understand what drives them to help in the Community--and discover the difference it has made in their lives as well! Take a look in our gallery today: What Motivates a Super User? - Power Platform Community (microsoft.com)

March User Group Update: New Groups and Upcoming Events!

  Welcome to this month’s celebration of our Community User Groups and exciting User Group events. We’re thrilled to introduce some brand-new user groups that have recently joined our vibrant community. Plus, we’ve got a lineup of engaging events you won’t want to miss. Let’s jump right in: New User Groups   Sacramento Power Platform GroupANZ Power Platform COE User GroupPower Platform MongoliaPower Platform User Group OmanPower Platform User Group Delta StateMid Michigan Power Platform Upcoming Events  DUG4MFG - Quarterly Meetup - Microsoft Demand PlanningDate: 19 Mar 2024 | 10:30 AM to 12:30 PM Central America Standard TimeDescription: Dive into the world of manufacturing with a focus on Demand Planning. Learn from industry experts and share your insights. Dynamics User Group HoustonDate: 07 Mar 2024 | 11:00 AM to 01:00 PM Central America Standard TimeDescription: Houston, get ready for an immersive session on Dynamics 365 and the Power Platform. Connect with fellow professionals and expand your knowledge. Reading Dynamics 365 & Power Platform User Group (Q1)Date: 05 Mar 2024 | 06:00 PM to 09:00 PM GMT Standard TimeDescription: Join our virtual meetup for insightful discussions, demos, and community updates. Let’s kick off Q1 with a bang! Leaders, Create Your Events!  Leaders of existing User Groups, don’t forget to create your events within the Community platform. By doing so, you’ll enable us to share them in future posts and newsletters. Let’s spread the word and make these gatherings even more impactful! Stay tuned for more updates, inspiring stories, and collaborative opportunities from and for our Community User Groups.   P.S. Have an event or success story to share? Reach out to us – we’d love to feature you!

Users online (5,948)