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

Tuesday Tip: Getting Started with Private Messages & Macros

Welcome to 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.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   This Week's Tip: Private Messaging & Macros in Power Apps Community   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!   Our Knowledge Base article about private messaging and macros is the best place to find out more. Check it out today and discover some key tips and tricks when it comes to messages and macros:   Private Messaging: Learn how to enable private messages in your community profile and ensure you’re connected with other community membersMacros Explained: Discover the convenience of macros—prewritten text snippets that save time when posting in forums or sending private messagesCreating Macros: Follow simple steps to create your own macros for efficient communication within the Power Apps CommunityUsage Guide: Understand how to apply macros in posts and private messages, enhancing your interaction with the Community For detailed instructions and more information, visit the full page in your community today:Power Apps: Enabling Private Messaging & How to Use Macros (Power Apps)Power Automate: Enabling Private Messaging & How to Use Macros (Power Automate)  Copilot Studio: Enabling Private Messaging &How to Use Macros (Copilot Studio) Power Pages: Enabling Private Messaging & How to Use Macros (Power Pages)

Tuesday Tip: Subscriptions & Notifications

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: All About Subscriptions & Notifications We don't want you to a miss a thing in the Community! The best way to make sure you know what's going on in the News & Announcements, to blogs you follow, or forums and galleries you're interested in is to subscribe! These subscriptions ensure you receive automated messages about the most recent posts and replies. Even better, there are multiple ways you can subscribe to content and boards in the community! (Please note: if you have created an AAD (Azure Active Directory) account you won't be able to receive e-mail notifications.)   Subscribing to a Category  When you're looking at the entire category, select from the Options drop down and choose Subscribe.     You can then choose to Subscribe to all of the boards or select only the boards you want to receive notifications. When you're satisfied with your choices, click Save.     Subscribing to a Topic You can also subscribe to a single topic by clicking Subscribe from the Options drop down menu, while you are viewing the topic or in the General board overview, respectively.     Subscribing to a Label Find the labels at the bottom left of a post.From a particular post with a label, click on the label to filter by that label. This opens a window containing a list of posts with the label you have selected. Click Subscribe.     Note: You can only subscribe to a label at the board level. If you subscribe to a label named 'Copilot' at board #1, it will not automatically subscribe you to an identically named label at board #2. You will have to subscribe twice, once at each board.   Bookmarks Just like you can subscribe to topics and categories, you can also bookmark topics and boards from the same menus! Simply go to the Topic Options drop down menu to bookmark a topic or the Options drop down to bookmark a board. The difference between subscribing and bookmarking is that subscriptions provide you with notifications, whereas bookmarks provide you a static way of easily accessing your favorite boards from the My subscriptions area.   Managing & Viewing Your Subscriptions & Bookmarks To manage your subscriptions, click on your avatar and select My subscriptions from the drop-down menu.     From the Subscriptions & Notifications tab, you can manage your subscriptions, including your e-mail subscription options, your bookmarks, your notification settings, and your email notification format.     You can see a list of all your subscriptions and bookmarks and choose which ones to delete, either individually or in bulk, by checking multiple boxes.     A Note on Following Friends on Mobile Adding someone as a friend or selecting Follow in the mobile view does not allow you to subscribe to their activity feed. You will merely be able to see your friends’ biography, other personal information, or online status, and send messages more quickly by choosing who to send the message to from a list, as opposed to having to search by username.

Monthly Community User Group Update | April 2024

The monthly Community User Group Update is your resource for discovering User Group meetings and events happening around the world (and virtually), welcoming new User Groups to our Community, and more! Our amazing Community User Groups are an important part of the Power Platform Community, with more than 700 Community User Groups worldwide, we know they're a great way to engage personally, while giving our members a place to learn and grow together.   This month, we welcome 3 new User Groups in India, Wales, and Germany, and feature 8 User Group Events across Power Platform and Dynamics 365. Find out more below. New Power Platform User Groups   Power Platform Innovators (India) About: Our aim is to foster a collaborative environment where we can share upcoming Power Platform events, best practices, and valuable content related to Power Platform. Whether you’re a seasoned expert or a newcomer looking to learn, this group is for you. Let’s empower each other to achieve more with Power Platform. Join us in shaping the future of digital transformation!   Power Platform User Group (Wales) About: A Power Platform User Group in Wales (predominantly based in Cardiff but will look to hold sessions around Wales) to establish a community to share learnings and experience in all parts of the platform.   Power Platform User Group (Hannover) About: This group is for anyone who works with the services of Microsoft Power Platform or wants to learn more about it and no-code/low-code. And, of course, Microsoft Copilot application in the Power Platform.   New Dynamics365 User Groups   Ellucian CRM Recruit UK (United Kingdom) About: A group for United Kingdom universities using Ellucian CRM Recruit to manage their admissions process, to share good practice and resolve issues.    Business Central Mexico (Mexico City) About:  A place to find documentation, learning resources, and events focused on user needs in Mexico. We meet to discuss and answer questions about the current features in the standard localization that Microsoft provides, and what you only find in third-party locations. In addition, we focus on what's planned for new standard versions, recent legislation requirements, and more. Let's work together to drive request votes for Microsoft for features that aren't currently found—but are indispensable.   Dynamics 365 F&O User Group (Dublin) About: The Dynamics 365 F&O User Group - Ireland Chapter meets up in person at least twice yearly in One Microsoft Place Dublin for users to have the opportunity to have conversations on mutual topics, find out what’s new and on the Dynamics 365 FinOps Product Roadmap, get insights from customer and partner experiences, and access to Microsoft subject matter expertise.  Upcoming Power Platform Events    PAK Time (Power Apps Kwentuhan) 2024 #6 (Phillipines, Online) This is a continuation session of Custom API. Sir Jun Miano will be sharing firsthand experience on setting up custom API and best practices. (April 6, 2024)       Power Apps: Creating business applications rapidly (Sydney) At this event, learn how to choose the right app on Power Platform, creating a business application in an hour, and tips for using Copilot AI. While we recommend attending all 6 events in the series, each session is independent of one another, and you can join the topics of your interest. Think of it as a “Hop On, Hop Off” bus! Participation is free, but you need a personal computer (laptop) and we provide the rest. We look forward to seeing you there! (April 11, 2024)     April 2024 Cleveland Power Platform User Group (Independence, Ohio) Kickoff the meeting with networking, and then our speaker will share how to create responsive and intuitive Canvas Apps using features like Variables, Search and Filtering. And how PowerFx rich functions and expressions makes configuring those functionalities easier. Bring ideas to discuss and engage with other community members! (April 16, 2024)     Dynamics 365 and Power Platform 2024 Wave 1 Release (NYC, Online) This session features Aric Levin, Microsoft Business Applications MVP and Technical Architect at Avanade and Mihir Shah, Global CoC Leader of Microsoft Managed Services at IBM. We will cover some of the new features and enhancements related to the Power Platform, Dataverse, Maker Portal, Unified Interface and the Microsoft First Party Apps (Microsoft Dynamics 365) that were announced in the Microsoft Dynamics 365 and Power Platform 2024 Release Wave 1 Plan. (April 17, 2024)     Let’s Explore Copilot Studio Series: Bot Skills to Extend Your Copilots (Makati National Capital Reg... Join us for the second installment of our Let's Explore Copilot Studio Series, focusing on Bot Skills. Learn how to enhance your copilot's abilities to automate tasks within specific topics, from booking appointments to sending emails and managing tasks. Discover the power of Skills in expanding conversational capabilities. (April 30, 2024)   Upcoming Dynamics365 Events    Leveraging Customer Managed Keys (CMK) in Dynamics 365 (Noida, Uttar Pradesh, Online) This month's featured topic: Leveraging Customer Managed Keys (CMK) in Dynamics 365, with special guest Nitin Jain from Microsoft. We are excited and thankful to him for doing this session. Join us for this online session, which should be helpful to all Dynamics 365 developers, Technical Architects and Enterprise architects who are implementing Dynamics 365 and want to have more control on the security of their data over Microsoft Managed Keys. (April 11, 2024)       Stockholm D365 User Group April Meeting (Stockholm) This is a Swedish user group for D365 Finance and Operations, AX2012, CRM, CE, Project Operations, and Power BI.  (April 17, 2024)         Transportation Management in D365 F&SCM Q&A Session (Toronto, Online) Calling all Toronto UG members and beyond! Join us for an engaging and informative one-hour Q&A session, exclusively focused on Transportation Management System (TMS) within Dynamics 365 F&SCM. Whether you’re a seasoned professional or just curious about TMS, this event is for you. Bring your questions! (April 26, 2024)   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. Just leave a comment or send a PM here in the Community!

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

We have closed kudos on this post at this time. Thank you to everyone who kudo'ed their RSVP--your invitations are coming soon!  Miss the window to RSVP? Don't worry--you can catch the recording of the meeting this week in the Community.  Details coming soon!   *****   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: Blogging in the Community is a Great Way to Start

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 Topic: Blogging in the Community Are you new to our Communities and feel like you may know a few things to share, but you're not quite ready to start answering questions in the forums? A great place to start is the Community blog! Whether you've been using Power Platform for awhile, or you're new to the low-code revolution, the Community blog is a place for anyone who can write, has some great insight to share, and is willing to commit to posting regularly! In other words, we want YOU to join the Community blog.    Why should you consider becoming a blog author? Here are just a few great reasons. 🎉   Learn from Each Other: Our community is like a bustling marketplace of ideas. By sharing your experiences and insights, you contribute to a dynamic ecosystem where makers learn from one another. Your unique perspective matters! Collaborate and Innovate: Imagine a virtual brainstorming session where minds collide, ideas spark, and solutions emerge. That’s what our community blog offers—a platform for collaboration and innovation. Together, we can build something extraordinary. Showcase the Power of Low-Code: You know that feeling when you discover a hidden gem? By writing about your experience with your favorite Power Platform tool, you’re shining a spotlight on its capabilities and real-world applications. It’s like saying, “Hey world, check out this amazing tool!” Earn Trust and Credibility: When you share valuable information, you become a trusted resource. Your fellow community members rely on your tips, tricks, and know-how. It’s like being the go-to friend who always has the best recommendations. Empower Others: By contributing to our community blog, you empower others to level up their skills. Whether it’s a nifty workaround, a time-saving hack, or an aha moment, your words have impact. So grab your keyboard, brew your favorite beverage, and start writing! Your insights matter and your voice counts! With every blog shared in the Community, we all do a better job of tackling complex challenges with gusto. 🚀 Welcome aboard, future blog author! ✍️💻🌟 Get started blogging across the Power Platform Communities today! Just follow one of the links below to begin your blogging adventure.   Power Apps: https://powerusers.microsoft.com/t5/Power-Apps-Community-Blog/bg-p/PowerAppsBlog Power Automate: https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/bg-p/MPABlog Copilot Studio: https://powerusers.microsoft.com/t5/Copilot-Studio-Community-Blog/bg-p/PVACommunityBlog Power Pages: https://powerusers.microsoft.com/t5/Power-Pages-Community-Blog/bg-p/mpp_blog   When you follow the link, look for the Message Admins button like this on the page's right rail, and let us know you're interested. We can't wait to connect with you and help you get started. Thanks for being part of our incredible community--and thanks for becoming part of the community blog!

Launch Event Registration: Redefine What's Possible Using AI

  Join Microsoft product leaders and engineers for an in-depth look at the latest features in Microsoft Dynamics 365 and Microsoft Power Platform. Learn how advances in AI and Microsoft Copilot can help you connect teams, processes, and data, and respond to changing business needs with greater agility. We’ll share insights and demonstrate how 2024 release wave 1 updates and advancements will help you:   Streamline business processes, automate repetitive tasks, and unlock creativity using the power of Copilot and role-specific insights and actions. Unify customer data to optimize customer journeys with generative AI and foster collaboration between sales and marketing teams. Strengthen governance with upgraded tools and features. Accelerate low-code development  using natural language and streamlined tools. Plus, you can get answers to your questions during our live Q&A chat! Don't wait--register today by clicking the image below!      

Users online (6,141)