Hi @markfleet,
I use your code to collect more than 5000 records in JSON it got collected but its throwing SCHEMA error in ParseJSON step in Powerautomate "Expected Array but got String". Am I missing something in Powerapps code or any step before ParseJSON.
This is powerapps code generating & passing json
Clear(repodatajsoncol);
With({BatchSize: 1000, RowCount: CountRows(repodata)},
With({BatchCount: RoundUp(RowCount / BatchSize, 0)},
ForAll(RenameColumns(Sequence(BatchCount), "Value", "i"),
Collect(
repodatajsoncol,
JSON(ShowColumns(
LastN(
FirstN(repodata,
i * BatchSize
),
BatchSize - Max(
((i * BatchSize) - CountRows(repodata)),
0
)
),"cr17c_account_number","cr17c_cnumber","cr17c_country","cr17c_d_u_number","cr17c_enddate","cr17c_entrname","cr17c_status__c","cr17c_center_name__c","cr17c_rtu__c","cr17c_type__c","cr17c_platform__c","cr17c_portfolioc","cr17c_group_name__c","cr17c_ro2q_sld_id__c"
)
)
)
)
)
);
Set(repodatajson,JSON(First(repodatajsoncol).Value));Set(varLink,PasrseJsonPAPS.Run(repodatajson).filelink);Launch(varLink)
This is the JSON received in Powerautomate which is giving above error in ParseJSON
"\"[{\"cr17c_account_number\":\"XXXXXXXX\",\"cr17c_cnumber\":xxxxxxxxx,\"cr17c_country\":\"XX\",\"cr17c_d_u_number\":null,\"cr17c_enddate\":\"2021-09-30\",\"cr17c_entrname\":\"XXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\"cr17c_status__c\":\"Active\",\"cr17c_center_name__c\":\"XXXXXX\",\"cr17c_rtu__c\":null,\"cr17c_type__c\":\"XXXXX\",\"cr17c_platform__c\":null,\"cr17c_portfolioc\":\"XXXXXXXX\",\"cr17c_group_name__c\":\"XXXXXXXXXX\",\"cr17c_ro2q_sld_id__c\":XXXXXXX}]\""