a!queryRecordType vs a!recordData performance difference when using Record Level Security

Certified Lead Developer

We have a record with a large complex Security Expression defined in Record-Level Security.

When querying this record using an a!queryRecordType, the query takes ~1,500ms (90 rows, ~ 16 columns)

When querying using a!recordData in a gridField, the query takes over 13,000ms

To make the test fair, we have have kept just 1 column in the grid showing the ID of the record, and have not defined any sorting, no filters are applied for either query

When the record level security is turned off,  a!recordData in a gridField takes 253ms to run.

What might be causing a!recordData to perform so much worse when record level security is turned on?

  Discussion posts and replies are publicly visible

Parents
  • Can you take a look at the query performance monitor for the two queries? That should give a sense of any differences for the queries being executed. Can you also share the expression for the interface?

  • 0
    Certified Lead Developer
    in reply to Peter Lewis

    Here's the expression for the interface (I've simplified it), and below a screenshot of execution times of queryRecord vs gridField.

    a!localVariables(
      local!queryRecordTest: a!queryRecordType(
        recordType: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document',
        pagingInfo: a!pagingInfo(1, 5000)
      ).data,
      {
        a!gridField(
          label: "Read-only Grid",
          labelPosition: "ABOVE",
          data: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document',
          columns: {
            a!gridColumn(
              label: "Sharepoint Document Id",
              value: fv!row['recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{9a942b70-d934-4557-9790-c9d9cfc7634b}sharepointDocumentId']
            ),
            
          }
        )
      }
    )

  • 0
    Certified Lead Developer
    in reply to Guy

    For comparison, here's the metrics without record level security

  • 0
    Appian Employee
    in reply to Guy

    Interesting, can you also post the security expression?

  • 0
    Certified Lead Developer
    in reply to Peter Lewis

    Sure, see attached, there is a top level expression LPP_ER_DocumentRepositoryFilter that calls either one of:

    LPP_ER_ClientSharepointFilter

    LPP_ER_InternalSharepointFilter

    LPP_ER_TpaSharepointFilter

    I have inherited this, it's quite  complex, I've not yet attempted to simplify.

    --------LPP_ER_DocumentRepositoryFilter--------------------------
    
    if(
      a!isUserMemberOfGroup(
        username: loggedInUser(),
        groups: cons!LPP_GROUP_CLIENTS
      ),
      rule!LPP_ER_ClientSharepointFilter(),
      if(
        a!isUserMemberOfGroup(
          username: loggedInUser(),
          groups: cons!LPP_GROUP_INTERNAL_USERS
        ),
        rule!LPP_ER_InternalSharepointFilter(),
        rule!LPP_ER_TpaSharepointFilter()
      )
    )
    
    
    
    --------LPP_ER_ClientSharepointFilter--------------------------
    
    
    a!localVariables(
      local!loggedInUser: rule!LPP_QR_QueryUser(
        userEmail: loggedInUser(),
        pagingInfo: a!pagingInfo(1, 1)
      ),
      local!loggedInUserInvestorAccounts: rule!LPP_QR_QueryAccounts(
        isExcludeMainAccount: true(),
        fields: {
          'recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.relationships.{e6992d3d-2461-4b25-89b7-d926d42a52a7}client'
        }
      ),
      local!loggedInUserInvestorVehicles: rule!LPP_QR_QueryInvestorVehicles(
        fields: {
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity',
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.relationships.{22a37ece-614c-430c-ab07-ac5bad04e569}fund',
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.relationships.{22a37ece-614c-430c-ab07-ac5bad04e569}fund.relationships.{42e12320-aa7f-4540-939a-f50af1287803}strategy',
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.relationships.{22a37ece-614c-430c-ab07-ac5bad04e569}fund.relationships.{42e12320-aa7f-4540-939a-f50af1287803}strategy.relationships.{fb3d69e6-08e0-4fdf-a532-d8046e62c44e}segment',
    
        },
        accountId: local!loggedInUserInvestorAccounts['recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.fields.{1afdb4fd-6dd8-4283-8e74-99a79dc6af2e}accountId']
      ),
      local!loggedInUserDocumentAccess: rule!LPP_QR_QueryDocumentAccess(
        accountId: local!loggedInUserInvestorAccounts['recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.fields.{1afdb4fd-6dd8-4283-8e74-99a79dc6af2e}accountId'],
        userId: local!loggedInUser['recordType!{1a9a8797-1475-4846-a9e5-ca0f29e2e903}LPP User.fields.{47c71e53-efa6-403c-931e-0374c265490d}userId'],
        fields: {
          'recordType!{66eb3ef9-6997-45da-85eb-4cb72da1cc05}LPP Document Access.relationships.{4ca991af-4681-47e2-933b-8972b4f344d4}documentCategory'
        }
      ),
      a!queryLogicalExpression(
        operator: "OR",
        filters: {
          /*All users should see general documents, regardless of their Investor Account access and document category access*/
          a!queryFilter(
            field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{e93a822c-97af-45ad-af9e-f1243871ccbe}isGeneralDocument',
            operator: "=",
            value: true()
          )
        },
        logicalExpressions: a!queryLogicalExpression(
          operator: "OR",
          logicalExpressions: a!forEach(
            items: local!loggedInUserInvestorAccounts,
            expression: if(
              a!isNullOrEmpty(
                fv!item['recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.fields.{1245b7c3-b10c-419a-a9d3-db25ac758c51}dealcloudId']
              ),
              a!queryLogicalExpression(
                operator: "AND",
                filters: a!queryFilter(
                  field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{9a942b70-d934-4557-9790-c9d9cfc7634b}sharepointDocumentId',
                  operator: "is null"
                )
              ),
              a!localVariables(
                local!currentInvestorVehicles: index(
                  local!loggedInUserInvestorVehicles,
                  wherecontains(
                    tointeger(
                      index(
                        fv!item,
                        'recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.fields.{1afdb4fd-6dd8-4283-8e74-99a79dc6af2e}accountId',
                        {}
                      )
                    ),
                    tointeger(
                      index(
                        local!loggedInUserInvestorVehicles,
                        'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.fields.{4a802bda-8583-4875-be7a-c9bc9cb0f404}accountId',
                        {}
                      )
                    )
                  ),
                  {}
                ),
                local!currentLegalEntities: index(
                  local!currentInvestorVehicles,
                  'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.fields.{064ba9a7-4c16-44f6-be63-71722be1581b}dealcloudId',
                  {}
                ),
                local!currentFunds: index(
                  local!currentInvestorVehicles,
                  'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.relationships.{22a37ece-614c-430c-ab07-ac5bad04e569}fund.fields.{95fd38a0-b435-4764-94ca-6c2bd3deab20}dealcloudId',
                  {}
                ),
                local!currentStrategies: index(
                  local!currentInvestorVehicles,
                  'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.relationships.{22a37ece-614c-430c-ab07-ac5bad04e569}fund.relationships.{42e12320-aa7f-4540-939a-f50af1287803}strategy.fields.{8bc4622a-8c0e-4fb0-bf3a-dcfb9d0b3a98}dealcloudId',
                  {}
                ),
                local!currentSegments: index(
                  local!currentInvestorVehicles,
                  'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.relationships.{22a37ece-614c-430c-ab07-ac5bad04e569}fund.relationships.{42e12320-aa7f-4540-939a-f50af1287803}strategy.relationships.{fb3d69e6-08e0-4fdf-a532-d8046e62c44e}segment.fields.{8678e587-43f4-43fe-9497-3303b3d1e43a}segmentId',
                  {}
                ),
                local!currentDocumentCategoryAccess: index(
                  local!loggedInUserDocumentAccess,
                  wherecontains(
                    tointeger(
                      fv!item['recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.fields.{1afdb4fd-6dd8-4283-8e74-99a79dc6af2e}accountId']
                    ),
                    tointeger(
                      local!loggedInUserDocumentAccess['recordType!{66eb3ef9-6997-45da-85eb-4cb72da1cc05}LPP Document Access.fields.{d26e9a4c-9d42-41fd-b496-52c8bb0e2552}accountId']
                    )
                  ),
                  {}
                ),
                a!queryLogicalExpression(
                  operator: "AND",
                  filters: {
                    /*  Document Category filter */
                    if(
                      a!isNullOrEmpty(local!currentDocumentCategoryAccess),
                      a!queryFilter(
                        field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{cfe27109-d7e1-4691-827d-9174c1d9930e}sharepointFileId',
                        operator: "is null"
                      ),
                      a!queryFilter(
                        field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{e51c8158-e191-40ff-8328-2fe57fbdb43d}documentCategory',
                        operator: "in",
                        value: local!currentDocumentCategoryAccess['recordType!{66eb3ef9-6997-45da-85eb-4cb72da1cc05}LPP Document Access.relationships.{4ca991af-4681-47e2-933b-8972b4f344d4}documentCategory.fields.{daf628cd-2e01-43f9-8c75-182c69594061}documentCategoryCode']
                      )
                    )
                  },
                  logicalExpressions: {
                    a!queryLogicalExpression(
                      operator: "OR",
                      filters: {
                        /*Investor Account & Vehicle filter  */
                        if(
                          a!isNullOrEmpty(
                            fv!item['recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.fields.{1245b7c3-b10c-419a-a9d3-db25ac758c51}dealcloudId']
                          ),
                          {},
                          a!queryFilter(
                            field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{99118186-5022-4996-b5e5-264ca9e850dc}investorAccountId',
                            operator: "=",
                            value: fv!item['recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.fields.{1245b7c3-b10c-419a-a9d3-db25ac758c51}dealcloudId']
                          )
                        )
                      },
                      logicalExpressions: {
                        /*if current document access has access to group and if investor account tag is null or user has access */
                        if(
                          a!isNullOrEmpty(
                            fv!item['recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.relationships.{e6992d3d-2461-4b25-89b7-d926d42a52a7}client.fields.{dea3ce41-1623-498e-8c4e-f91e254f5185}dealcloudId']
                          ),
                          {},
                          a!queryLogicalExpression(
                            operator: "AND",
                            filters: {
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{0651bf53-e0f6-4dd6-8979-9e9bfe0b34c4}groupId',
                                operator: "=",
                                value: fv!item['recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.relationships.{e6992d3d-2461-4b25-89b7-d926d42a52a7}client.fields.{dea3ce41-1623-498e-8c4e-f91e254f5185}dealcloudId']
                              ),
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{99118186-5022-4996-b5e5-264ca9e850dc}investorAccountId',
                                operator: "is null"
                              )
                            }
                          )
                        ),
                        /*if current document access has access to legal entity and if subscription is null or user has access */
                        if(
                          a!isNullOrEmpty(local!currentLegalEntities),
                          {},
                          a!queryLogicalExpression(
                            operator: "AND",
                            filters: {
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{3e143fd3-35dc-401e-a8de-12695930ea33}fundEntityId',
                                operator: "in",
                                value: local!currentLegalEntities
                              ),
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{b198d5a7-17e2-4eb2-a1c6-935254e48e6e}investorVehicleId',
                                operator: "is null"
                              )
                            }
                          )
                        ),
                        /*if current document access has access to fund and if legal entity is null or user has access */
                        if(
                          a!isNullOrEmpty(local!currentFunds),
                          {},
                          a!queryLogicalExpression(
                            operator: "AND",
                            filters: {
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{0f00bf25-90e7-4381-a4c0-a183fc954d41}fundId',
                                operator: "in",
                                value: local!currentFunds
                              ),
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{3e143fd3-35dc-401e-a8de-12695930ea33}fundEntityId',
                                operator: "is null"
                              )
                            }
                          )
                        ),
                        if(
                          a!isNullOrEmpty(local!currentStrategies),
                          {},
                          a!queryLogicalExpression(
                            operator: "AND",
                            filters: {
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{fb82568b-4b43-402e-b313-0caa969f92b5}strategyId',
                                operator: "in",
                                value: local!currentStrategies
                              ),
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{0f00bf25-90e7-4381-a4c0-a183fc954d41}fundId',
                                operator: "is null"
                              )
                            }
                          )
                        ),
                        if(
                          a!isNullOrEmpty(local!currentSegments),
                          {},
                          a!queryLogicalExpression(
                            operator: "AND",
                            filters: {
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{a48fdfff-8920-4e8e-889f-199264e0c946}segmentId',
                                operator: "in",
                                value: local!currentSegments
                              ),
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{fb82568b-4b43-402e-b313-0caa969f92b5}strategyId',
                                operator: "is null"
                              )
                            }
                          )
                        )
                      }
                    )
                  }
                )
              )
            )
          )
        )
      )
    )
    
    
    
    
    
    --------LPP_ER_InternalSharepointFilter--------------------------
    
    a!localVariables(
      local!refStrategies: rule!LPP_QR_QueryStrategy(
        pagingInfo: a!pagingInfo(1, - 1),
        fetchDatasubsetAndTotalCount: false()
      ),
      local!loggedInUserInternalDocumentAccess: rule!LPP_QR_QueryInternalDocumentAccess(
        fields: {
          'recordType!{0379e5a8-eb87-4ab5-a4a0-b07814b2c760}LPP Internal Document Access.relationships.{fa68e702-7d62-488a-8855-9d3a3b4c9ca9}segment.relationships.{98cb4501-bb36-479c-a6c7-2cc7b66830e1}strategy',
          'recordType!{0379e5a8-eb87-4ab5-a4a0-b07814b2c760}LPP Internal Document Access.relationships.{a359a8f8-fb42-442c-84e1-6ed3bb9e691d}internalDocumentAccessCategory.relationships.{f2c00d9a-060a-4f4e-803d-3a69d53f65c6}documentCategory'
        },
        userEmail: loggedInUser()
      ),
      local!loggedInUserFunds: rule!LPP_QR_QueryFunds(
        strategyId: union(
          local!loggedInUserInternalDocumentAccess['recordType!{0379e5a8-eb87-4ab5-a4a0-b07814b2c760}LPP Internal Document Access.relationships.{fa68e702-7d62-488a-8855-9d3a3b4c9ca9}segment.relationships.{98cb4501-bb36-479c-a6c7-2cc7b66830e1}strategy.fields.{fac99f27-0c1f-4353-a054-f7ea3e30619e}strategyId'],
          local!loggedInUserInternalDocumentAccess['recordType!{0379e5a8-eb87-4ab5-a4a0-b07814b2c760}LPP Internal Document Access.relationships.{fa68e702-7d62-488a-8855-9d3a3b4c9ca9}segment.relationships.{98cb4501-bb36-479c-a6c7-2cc7b66830e1}strategy.fields.{fac99f27-0c1f-4353-a054-f7ea3e30619e}strategyId'],
    
        )
      ),
      local!loggedInUserLegalEntities: rule!LPP_QR_QueryLegalEntities(
        fundId: local!loggedInUserFunds['recordType!{5687424b-b4e7-48fe-bcd8-f3dd1bd17814}LPP Fund.fields.{b6d90811-725b-4aa2-b7af-1ecc91eb813b}fundId']
      ),
      local!loggedInUserInvestorVehicles: rule!LPP_QR_BatchQueryInvestorVehicles(
        fields: {
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.relationships.{22a37ece-614c-430c-ab07-ac5bad04e569}fund.relationships.{42e12320-aa7f-4540-939a-f50af1287803}strategy.fields.{fac99f27-0c1f-4353-a054-f7ea3e30619e}strategyId',
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.relationships.{e6992d3d-2461-4b25-89b7-d926d42a52a7}client.fields.{dea3ce41-1623-498e-8c4e-f91e254f5185}dealcloudId',
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.fields.{1245b7c3-b10c-419a-a9d3-db25ac758c51}dealcloudId',
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.fields.{289fdfe4-d11b-435c-827b-2895e01a69a7}dealcloudId'
        },
        legalEntityId: local!loggedInUserLegalEntities['recordType!{80f538b0-9b66-4fae-8032-70af9d696d05}LPP Legal Entity.fields.{bfed8a1c-73bc-4b96-bb11-dd678a823055}legalEntityId']
      ),
      if(
        a!isNullOrEmpty(
          local!loggedInUserInternalDocumentAccess
        ),
        a!queryLogicalExpression(
          operator: "AND",
          filters: a!queryFilter(
            field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{cfe27109-d7e1-4691-827d-9174c1d9930e}sharepointFileId',
            operator: "is null"
          )
        ),
        a!queryLogicalExpression(
          operator: "OR",
          filters: {
            /*All users should see general documents, regardless of their Investor Account access and document category access*/
            a!queryFilter(
              field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{e93a822c-97af-45ad-af9e-f1243871ccbe}isGeneralDocument',
              operator: "=",
              value: true()
            )
          },
          logicalExpressions: a!queryLogicalExpression(
            operator: "OR",
            logicalExpressions: a!forEach(
              items: union(
                a!flatten(
                  local!loggedInUserInternalDocumentAccess['recordType!{0379e5a8-eb87-4ab5-a4a0-b07814b2c760}LPP Internal Document Access.relationships.{fa68e702-7d62-488a-8855-9d3a3b4c9ca9}segment.relationships.{98cb4501-bb36-479c-a6c7-2cc7b66830e1}strategy']
                ),
                a!flatten(
                  local!loggedInUserInternalDocumentAccess['recordType!{0379e5a8-eb87-4ab5-a4a0-b07814b2c760}LPP Internal Document Access.relationships.{fa68e702-7d62-488a-8855-9d3a3b4c9ca9}segment.relationships.{98cb4501-bb36-479c-a6c7-2cc7b66830e1}strategy']
                )
              ),
              expression: if(
                a!isNullOrEmpty(
                  fv!item['recordType!{dff8e999-caf0-43fe-b1d4-aca96cba3448}LPP Strategy.fields.{8bc4622a-8c0e-4fb0-bf3a-dcfb9d0b3a98}dealcloudId']
                ),
                a!queryLogicalExpression(
                  operator: "AND",
                  filters: a!queryFilter(
                    field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{cfe27109-d7e1-4691-827d-9174c1d9930e}sharepointFileId',
                    operator: "is null"
                  )
                ),
                a!localVariables(
                  local!currentStrategyDocumentAccess: index(
                    local!loggedInUserInternalDocumentAccess,
                    wherecontains(
                      index(
                        local!refStrategies['recordType!{dff8e999-caf0-43fe-b1d4-aca96cba3448}LPP Strategy.fields.{00d3bf64-39b6-424d-bcf4-53d1af97a033}segmentId'],
                        wherecontains(
                          tointeger(
                            fv!item['recordType!{dff8e999-caf0-43fe-b1d4-aca96cba3448}LPP Strategy.fields.{fac99f27-0c1f-4353-a054-f7ea3e30619e}strategyId']
                          ),
                          local!refStrategies['recordType!{dff8e999-caf0-43fe-b1d4-aca96cba3448}LPP Strategy.fields.{fac99f27-0c1f-4353-a054-f7ea3e30619e}strategyId']
                        ),
                        {}
                      ),
                      tointeger(
                        local!loggedInUserInternalDocumentAccess['recordType!{0379e5a8-eb87-4ab5-a4a0-b07814b2c760}LPP Internal Document Access.fields.{b3c070dd-ab4d-42c8-b7f1-4a69bf32521b}segmentId']
                      ),
    
                    ),
                    {}
                  ),
                  local!currentInvestorVehicles: index(
                    local!loggedInUserInvestorVehicles,
                    wherecontains(
                      tointeger(
                        fv!item['recordType!{dff8e999-caf0-43fe-b1d4-aca96cba3448}LPP Strategy.fields.{fac99f27-0c1f-4353-a054-f7ea3e30619e}strategyId']
                      ),
                      tointeger(
                        tointeger(
                          local!loggedInUserInvestorVehicles['recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.relationships.{22a37ece-614c-430c-ab07-ac5bad04e569}fund.relationships.{42e12320-aa7f-4540-939a-f50af1287803}strategy.fields.{fac99f27-0c1f-4353-a054-f7ea3e30619e}strategyId']
                        )
                      )
                    ),
                    {}
                  ),
                  a!queryLogicalExpression(
                    operator: "AND",
                    filters: if(
                      a!isNullOrEmpty(local!currentStrategyDocumentAccess),
                      a!queryFilter(
                        field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{cfe27109-d7e1-4691-827d-9174c1d9930e}sharepointFileId',
                        operator: "is null"
                      ),
                      a!queryFilter(
                        field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{e51c8158-e191-40ff-8328-2fe57fbdb43d}documentCategory',
                        operator: "in",
                        value: a!flatten(
                          local!currentStrategyDocumentAccess['recordType!{0379e5a8-eb87-4ab5-a4a0-b07814b2c760}LPP Internal Document Access.relationships.{a359a8f8-fb42-442c-84e1-6ed3bb9e691d}internalDocumentAccessCategory.relationships.{f2c00d9a-060a-4f4e-803d-3a69d53f65c6}documentCategory.fields.{daf628cd-2e01-43f9-8c75-182c69594061}documentCategoryCode']
                        )
                      ),
    
                    ),
                    logicalExpressions: a!queryLogicalExpression(
                      operator: "OR",
                      filters: if(
                        a!isNullOrEmpty(
                          fv!item['recordType!{dff8e999-caf0-43fe-b1d4-aca96cba3448}LPP Strategy.fields.{8bc4622a-8c0e-4fb0-bf3a-dcfb9d0b3a98}dealcloudId']
                        ),
                        {},
                        a!queryFilter(
                          field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{fb82568b-4b43-402e-b313-0caa969f92b5}strategyId',
                          operator: "=",
                          value: fv!item['recordType!{dff8e999-caf0-43fe-b1d4-aca96cba3448}LPP Strategy.fields.{8bc4622a-8c0e-4fb0-bf3a-dcfb9d0b3a98}dealcloudId']
                        )
                      ),
                      logicalExpressions: {
                        /*Investor Account Specific Documents  */
                        a!queryLogicalExpression(
                          operator: "AND",
                          filters: {
                            if(
                              a!isNullOrEmpty(
                                local!currentInvestorVehicles['recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.fields.{1245b7c3-b10c-419a-a9d3-db25ac758c51}dealcloudId']
                              ),
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{cfe27109-d7e1-4691-827d-9174c1d9930e}sharepointFileId',
                                operator: "is null"
                              ),
                              {
                                a!queryFilter(
                                  field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{99118186-5022-4996-b5e5-264ca9e850dc}investorAccountId',
                                  operator: "in",
                                  value: local!currentInvestorVehicles['recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.fields.{1245b7c3-b10c-419a-a9d3-db25ac758c51}dealcloudId']
                                ),
                                a!queryFilter(
                                  field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{b198d5a7-17e2-4eb2-a1c6-935254e48e6e}investorVehicleId',
                                  operator: "is null"
                                )
                              }
                            ),
    
                          }
                        ),
                        /*Group Specific Documents  */
                        a!queryLogicalExpression(
                          operator: "AND",
                          filters: {
                            if(
                              a!isNullOrEmpty(
                                local!currentInvestorVehicles['recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.fields.{1245b7c3-b10c-419a-a9d3-db25ac758c51}dealcloudId']
                              ),
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{cfe27109-d7e1-4691-827d-9174c1d9930e}sharepointFileId',
                                operator: "is null"
                              ),
                              {
                                a!queryFilter(
                                  field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{0651bf53-e0f6-4dd6-8979-9e9bfe0b34c4}groupId',
                                  operator: "in",
                                  value: local!currentInvestorVehicles['recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.relationships.{e6992d3d-2461-4b25-89b7-d926d42a52a7}client.fields.{dea3ce41-1623-498e-8c4e-f91e254f5185}dealcloudId']
                                ),
                                a!queryFilter(
                                  field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{99118186-5022-4996-b5e5-264ca9e850dc}investorAccountId',
                                  operator: "is null"
                                )
                              }
                            )
                          }
                        )
                      }
                    )
                  )
                )
              )
            )
          )
        )
      )
    )
    
    
    
    
    
    
    
    --------LPP_ER_TpaSharepointFilter--------------------------
    
    a!localVariables(
      local!strategyIds: rule!LPP_ER_GetStrategiesForUser(user: loggedInUser()),
      local!strategies: rule!LPP_QR_QueryStrategy(strategyId: local!strategyIds, ),
      local!funds: rule!LPP_QR_QueryFunds(strategyId: local!strategyIds),
      local!legalEntities: rule!LPP_QR_QueryLegalEntities(
        fundId: local!funds['recordType!{5687424b-b4e7-48fe-bcd8-f3dd1bd17814}LPP Fund.fields.{b6d90811-725b-4aa2-b7af-1ecc91eb813b}fundId']
      ),
      local!investorVehicles: rule!LPP_QR_QueryInvestorVehicles(
        fields: {
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account',
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.relationships.{e6992d3d-2461-4b25-89b7-d926d42a52a7}client'
        },
        legalEntityId: local!legalEntities['recordType!{80f538b0-9b66-4fae-8032-70af9d696d05}LPP Legal Entity.fields.{bfed8a1c-73bc-4b96-bb11-dd678a823055}legalEntityId']
      ),
      a!queryLogicalExpression(
        operator: "OR",
        filters: {
          /*All users should see general documents, regardless of their Investor Account access and document category access*/
          a!queryFilter(
            field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{e93a822c-97af-45ad-af9e-f1243871ccbe}isGeneralDocument',
            operator: "=",
            value: true()
          )
        },
        logicalExpressions: a!queryLogicalExpression(
          operator: "OR",
          filters: /*  TPA user must have access to the strategy to which the document is attached  */
          a!queryFilter(
            field:  'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{fb82568b-4b43-402e-b313-0caa969f92b5}strategyId',
            operator: "in",
            value: local!strategies['recordType!{dff8e999-caf0-43fe-b1d4-aca96cba3448}LPP Strategy.fields.{8bc4622a-8c0e-4fb0-bf3a-dcfb9d0b3a98}dealcloudId']
          ),
          logicalExpressions: {
            /*  Investor Account Specific Documents  */
            a!queryLogicalExpression(
              operator: "AND",
              filters: {
                a!queryFilter(
                  field:  'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{99118186-5022-4996-b5e5-264ca9e850dc}investorAccountId',
                  operator: "in",
                  value: local!investorVehicles['recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.fields.{1245b7c3-b10c-419a-a9d3-db25ac758c51}dealcloudId']
                ),
                a!queryFilter(
                  field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{b198d5a7-17e2-4eb2-a1c6-935254e48e6e}investorVehicleId',
                  operator: "is null"
                )
              }
            ),
            /*  Group Specific Documents  */
            a!queryLogicalExpression(
              operator: "AND",
              filters: {
                a!queryFilter(
                  field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{0651bf53-e0f6-4dd6-8979-9e9bfe0b34c4}groupId',
                  operator: "in",
                  value: local!investorVehicles['recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.relationships.{e6992d3d-2461-4b25-89b7-d926d42a52a7}client.fields.{dea3ce41-1623-498e-8c4e-f91e254f5185}dealcloudId']
                ),
                a!queryFilter(
                  field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{99118186-5022-4996-b5e5-264ca9e850dc}investorAccountId',
                  operator: "is null"
                )
              }
            )
          }
        )
      )
    )
    
    
    
    
    
    

Reply
  • 0
    Certified Lead Developer
    in reply to Peter Lewis

    Sure, see attached, there is a top level expression LPP_ER_DocumentRepositoryFilter that calls either one of:

    LPP_ER_ClientSharepointFilter

    LPP_ER_InternalSharepointFilter

    LPP_ER_TpaSharepointFilter

    I have inherited this, it's quite  complex, I've not yet attempted to simplify.

    --------LPP_ER_DocumentRepositoryFilter--------------------------
    
    if(
      a!isUserMemberOfGroup(
        username: loggedInUser(),
        groups: cons!LPP_GROUP_CLIENTS
      ),
      rule!LPP_ER_ClientSharepointFilter(),
      if(
        a!isUserMemberOfGroup(
          username: loggedInUser(),
          groups: cons!LPP_GROUP_INTERNAL_USERS
        ),
        rule!LPP_ER_InternalSharepointFilter(),
        rule!LPP_ER_TpaSharepointFilter()
      )
    )
    
    
    
    --------LPP_ER_ClientSharepointFilter--------------------------
    
    
    a!localVariables(
      local!loggedInUser: rule!LPP_QR_QueryUser(
        userEmail: loggedInUser(),
        pagingInfo: a!pagingInfo(1, 1)
      ),
      local!loggedInUserInvestorAccounts: rule!LPP_QR_QueryAccounts(
        isExcludeMainAccount: true(),
        fields: {
          'recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.relationships.{e6992d3d-2461-4b25-89b7-d926d42a52a7}client'
        }
      ),
      local!loggedInUserInvestorVehicles: rule!LPP_QR_QueryInvestorVehicles(
        fields: {
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity',
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.relationships.{22a37ece-614c-430c-ab07-ac5bad04e569}fund',
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.relationships.{22a37ece-614c-430c-ab07-ac5bad04e569}fund.relationships.{42e12320-aa7f-4540-939a-f50af1287803}strategy',
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.relationships.{22a37ece-614c-430c-ab07-ac5bad04e569}fund.relationships.{42e12320-aa7f-4540-939a-f50af1287803}strategy.relationships.{fb3d69e6-08e0-4fdf-a532-d8046e62c44e}segment',
    
        },
        accountId: local!loggedInUserInvestorAccounts['recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.fields.{1afdb4fd-6dd8-4283-8e74-99a79dc6af2e}accountId']
      ),
      local!loggedInUserDocumentAccess: rule!LPP_QR_QueryDocumentAccess(
        accountId: local!loggedInUserInvestorAccounts['recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.fields.{1afdb4fd-6dd8-4283-8e74-99a79dc6af2e}accountId'],
        userId: local!loggedInUser['recordType!{1a9a8797-1475-4846-a9e5-ca0f29e2e903}LPP User.fields.{47c71e53-efa6-403c-931e-0374c265490d}userId'],
        fields: {
          'recordType!{66eb3ef9-6997-45da-85eb-4cb72da1cc05}LPP Document Access.relationships.{4ca991af-4681-47e2-933b-8972b4f344d4}documentCategory'
        }
      ),
      a!queryLogicalExpression(
        operator: "OR",
        filters: {
          /*All users should see general documents, regardless of their Investor Account access and document category access*/
          a!queryFilter(
            field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{e93a822c-97af-45ad-af9e-f1243871ccbe}isGeneralDocument',
            operator: "=",
            value: true()
          )
        },
        logicalExpressions: a!queryLogicalExpression(
          operator: "OR",
          logicalExpressions: a!forEach(
            items: local!loggedInUserInvestorAccounts,
            expression: if(
              a!isNullOrEmpty(
                fv!item['recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.fields.{1245b7c3-b10c-419a-a9d3-db25ac758c51}dealcloudId']
              ),
              a!queryLogicalExpression(
                operator: "AND",
                filters: a!queryFilter(
                  field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{9a942b70-d934-4557-9790-c9d9cfc7634b}sharepointDocumentId',
                  operator: "is null"
                )
              ),
              a!localVariables(
                local!currentInvestorVehicles: index(
                  local!loggedInUserInvestorVehicles,
                  wherecontains(
                    tointeger(
                      index(
                        fv!item,
                        'recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.fields.{1afdb4fd-6dd8-4283-8e74-99a79dc6af2e}accountId',
                        {}
                      )
                    ),
                    tointeger(
                      index(
                        local!loggedInUserInvestorVehicles,
                        'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.fields.{4a802bda-8583-4875-be7a-c9bc9cb0f404}accountId',
                        {}
                      )
                    )
                  ),
                  {}
                ),
                local!currentLegalEntities: index(
                  local!currentInvestorVehicles,
                  'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.fields.{064ba9a7-4c16-44f6-be63-71722be1581b}dealcloudId',
                  {}
                ),
                local!currentFunds: index(
                  local!currentInvestorVehicles,
                  'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.relationships.{22a37ece-614c-430c-ab07-ac5bad04e569}fund.fields.{95fd38a0-b435-4764-94ca-6c2bd3deab20}dealcloudId',
                  {}
                ),
                local!currentStrategies: index(
                  local!currentInvestorVehicles,
                  'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.relationships.{22a37ece-614c-430c-ab07-ac5bad04e569}fund.relationships.{42e12320-aa7f-4540-939a-f50af1287803}strategy.fields.{8bc4622a-8c0e-4fb0-bf3a-dcfb9d0b3a98}dealcloudId',
                  {}
                ),
                local!currentSegments: index(
                  local!currentInvestorVehicles,
                  'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.relationships.{22a37ece-614c-430c-ab07-ac5bad04e569}fund.relationships.{42e12320-aa7f-4540-939a-f50af1287803}strategy.relationships.{fb3d69e6-08e0-4fdf-a532-d8046e62c44e}segment.fields.{8678e587-43f4-43fe-9497-3303b3d1e43a}segmentId',
                  {}
                ),
                local!currentDocumentCategoryAccess: index(
                  local!loggedInUserDocumentAccess,
                  wherecontains(
                    tointeger(
                      fv!item['recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.fields.{1afdb4fd-6dd8-4283-8e74-99a79dc6af2e}accountId']
                    ),
                    tointeger(
                      local!loggedInUserDocumentAccess['recordType!{66eb3ef9-6997-45da-85eb-4cb72da1cc05}LPP Document Access.fields.{d26e9a4c-9d42-41fd-b496-52c8bb0e2552}accountId']
                    )
                  ),
                  {}
                ),
                a!queryLogicalExpression(
                  operator: "AND",
                  filters: {
                    /*  Document Category filter */
                    if(
                      a!isNullOrEmpty(local!currentDocumentCategoryAccess),
                      a!queryFilter(
                        field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{cfe27109-d7e1-4691-827d-9174c1d9930e}sharepointFileId',
                        operator: "is null"
                      ),
                      a!queryFilter(
                        field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{e51c8158-e191-40ff-8328-2fe57fbdb43d}documentCategory',
                        operator: "in",
                        value: local!currentDocumentCategoryAccess['recordType!{66eb3ef9-6997-45da-85eb-4cb72da1cc05}LPP Document Access.relationships.{4ca991af-4681-47e2-933b-8972b4f344d4}documentCategory.fields.{daf628cd-2e01-43f9-8c75-182c69594061}documentCategoryCode']
                      )
                    )
                  },
                  logicalExpressions: {
                    a!queryLogicalExpression(
                      operator: "OR",
                      filters: {
                        /*Investor Account & Vehicle filter  */
                        if(
                          a!isNullOrEmpty(
                            fv!item['recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.fields.{1245b7c3-b10c-419a-a9d3-db25ac758c51}dealcloudId']
                          ),
                          {},
                          a!queryFilter(
                            field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{99118186-5022-4996-b5e5-264ca9e850dc}investorAccountId',
                            operator: "=",
                            value: fv!item['recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.fields.{1245b7c3-b10c-419a-a9d3-db25ac758c51}dealcloudId']
                          )
                        )
                      },
                      logicalExpressions: {
                        /*if current document access has access to group and if investor account tag is null or user has access */
                        if(
                          a!isNullOrEmpty(
                            fv!item['recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.relationships.{e6992d3d-2461-4b25-89b7-d926d42a52a7}client.fields.{dea3ce41-1623-498e-8c4e-f91e254f5185}dealcloudId']
                          ),
                          {},
                          a!queryLogicalExpression(
                            operator: "AND",
                            filters: {
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{0651bf53-e0f6-4dd6-8979-9e9bfe0b34c4}groupId',
                                operator: "=",
                                value: fv!item['recordType!{e1a12ec2-4c5e-4bfe-b304-cd2efb765346}LPP Account.relationships.{e6992d3d-2461-4b25-89b7-d926d42a52a7}client.fields.{dea3ce41-1623-498e-8c4e-f91e254f5185}dealcloudId']
                              ),
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{99118186-5022-4996-b5e5-264ca9e850dc}investorAccountId',
                                operator: "is null"
                              )
                            }
                          )
                        ),
                        /*if current document access has access to legal entity and if subscription is null or user has access */
                        if(
                          a!isNullOrEmpty(local!currentLegalEntities),
                          {},
                          a!queryLogicalExpression(
                            operator: "AND",
                            filters: {
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{3e143fd3-35dc-401e-a8de-12695930ea33}fundEntityId',
                                operator: "in",
                                value: local!currentLegalEntities
                              ),
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{b198d5a7-17e2-4eb2-a1c6-935254e48e6e}investorVehicleId',
                                operator: "is null"
                              )
                            }
                          )
                        ),
                        /*if current document access has access to fund and if legal entity is null or user has access */
                        if(
                          a!isNullOrEmpty(local!currentFunds),
                          {},
                          a!queryLogicalExpression(
                            operator: "AND",
                            filters: {
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{0f00bf25-90e7-4381-a4c0-a183fc954d41}fundId',
                                operator: "in",
                                value: local!currentFunds
                              ),
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{3e143fd3-35dc-401e-a8de-12695930ea33}fundEntityId',
                                operator: "is null"
                              )
                            }
                          )
                        ),
                        if(
                          a!isNullOrEmpty(local!currentStrategies),
                          {},
                          a!queryLogicalExpression(
                            operator: "AND",
                            filters: {
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{fb82568b-4b43-402e-b313-0caa969f92b5}strategyId',
                                operator: "in",
                                value: local!currentStrategies
                              ),
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{0f00bf25-90e7-4381-a4c0-a183fc954d41}fundId',
                                operator: "is null"
                              )
                            }
                          )
                        ),
                        if(
                          a!isNullOrEmpty(local!currentSegments),
                          {},
                          a!queryLogicalExpression(
                            operator: "AND",
                            filters: {
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{a48fdfff-8920-4e8e-889f-199264e0c946}segmentId',
                                operator: "in",
                                value: local!currentSegments
                              ),
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{fb82568b-4b43-402e-b313-0caa969f92b5}strategyId',
                                operator: "is null"
                              )
                            }
                          )
                        )
                      }
                    )
                  }
                )
              )
            )
          )
        )
      )
    )
    
    
    
    
    
    --------LPP_ER_InternalSharepointFilter--------------------------
    
    a!localVariables(
      local!refStrategies: rule!LPP_QR_QueryStrategy(
        pagingInfo: a!pagingInfo(1, - 1),
        fetchDatasubsetAndTotalCount: false()
      ),
      local!loggedInUserInternalDocumentAccess: rule!LPP_QR_QueryInternalDocumentAccess(
        fields: {
          'recordType!{0379e5a8-eb87-4ab5-a4a0-b07814b2c760}LPP Internal Document Access.relationships.{fa68e702-7d62-488a-8855-9d3a3b4c9ca9}segment.relationships.{98cb4501-bb36-479c-a6c7-2cc7b66830e1}strategy',
          'recordType!{0379e5a8-eb87-4ab5-a4a0-b07814b2c760}LPP Internal Document Access.relationships.{a359a8f8-fb42-442c-84e1-6ed3bb9e691d}internalDocumentAccessCategory.relationships.{f2c00d9a-060a-4f4e-803d-3a69d53f65c6}documentCategory'
        },
        userEmail: loggedInUser()
      ),
      local!loggedInUserFunds: rule!LPP_QR_QueryFunds(
        strategyId: union(
          local!loggedInUserInternalDocumentAccess['recordType!{0379e5a8-eb87-4ab5-a4a0-b07814b2c760}LPP Internal Document Access.relationships.{fa68e702-7d62-488a-8855-9d3a3b4c9ca9}segment.relationships.{98cb4501-bb36-479c-a6c7-2cc7b66830e1}strategy.fields.{fac99f27-0c1f-4353-a054-f7ea3e30619e}strategyId'],
          local!loggedInUserInternalDocumentAccess['recordType!{0379e5a8-eb87-4ab5-a4a0-b07814b2c760}LPP Internal Document Access.relationships.{fa68e702-7d62-488a-8855-9d3a3b4c9ca9}segment.relationships.{98cb4501-bb36-479c-a6c7-2cc7b66830e1}strategy.fields.{fac99f27-0c1f-4353-a054-f7ea3e30619e}strategyId'],
    
        )
      ),
      local!loggedInUserLegalEntities: rule!LPP_QR_QueryLegalEntities(
        fundId: local!loggedInUserFunds['recordType!{5687424b-b4e7-48fe-bcd8-f3dd1bd17814}LPP Fund.fields.{b6d90811-725b-4aa2-b7af-1ecc91eb813b}fundId']
      ),
      local!loggedInUserInvestorVehicles: rule!LPP_QR_BatchQueryInvestorVehicles(
        fields: {
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.relationships.{22a37ece-614c-430c-ab07-ac5bad04e569}fund.relationships.{42e12320-aa7f-4540-939a-f50af1287803}strategy.fields.{fac99f27-0c1f-4353-a054-f7ea3e30619e}strategyId',
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.relationships.{e6992d3d-2461-4b25-89b7-d926d42a52a7}client.fields.{dea3ce41-1623-498e-8c4e-f91e254f5185}dealcloudId',
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.fields.{1245b7c3-b10c-419a-a9d3-db25ac758c51}dealcloudId',
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.fields.{289fdfe4-d11b-435c-827b-2895e01a69a7}dealcloudId'
        },
        legalEntityId: local!loggedInUserLegalEntities['recordType!{80f538b0-9b66-4fae-8032-70af9d696d05}LPP Legal Entity.fields.{bfed8a1c-73bc-4b96-bb11-dd678a823055}legalEntityId']
      ),
      if(
        a!isNullOrEmpty(
          local!loggedInUserInternalDocumentAccess
        ),
        a!queryLogicalExpression(
          operator: "AND",
          filters: a!queryFilter(
            field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{cfe27109-d7e1-4691-827d-9174c1d9930e}sharepointFileId',
            operator: "is null"
          )
        ),
        a!queryLogicalExpression(
          operator: "OR",
          filters: {
            /*All users should see general documents, regardless of their Investor Account access and document category access*/
            a!queryFilter(
              field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{e93a822c-97af-45ad-af9e-f1243871ccbe}isGeneralDocument',
              operator: "=",
              value: true()
            )
          },
          logicalExpressions: a!queryLogicalExpression(
            operator: "OR",
            logicalExpressions: a!forEach(
              items: union(
                a!flatten(
                  local!loggedInUserInternalDocumentAccess['recordType!{0379e5a8-eb87-4ab5-a4a0-b07814b2c760}LPP Internal Document Access.relationships.{fa68e702-7d62-488a-8855-9d3a3b4c9ca9}segment.relationships.{98cb4501-bb36-479c-a6c7-2cc7b66830e1}strategy']
                ),
                a!flatten(
                  local!loggedInUserInternalDocumentAccess['recordType!{0379e5a8-eb87-4ab5-a4a0-b07814b2c760}LPP Internal Document Access.relationships.{fa68e702-7d62-488a-8855-9d3a3b4c9ca9}segment.relationships.{98cb4501-bb36-479c-a6c7-2cc7b66830e1}strategy']
                )
              ),
              expression: if(
                a!isNullOrEmpty(
                  fv!item['recordType!{dff8e999-caf0-43fe-b1d4-aca96cba3448}LPP Strategy.fields.{8bc4622a-8c0e-4fb0-bf3a-dcfb9d0b3a98}dealcloudId']
                ),
                a!queryLogicalExpression(
                  operator: "AND",
                  filters: a!queryFilter(
                    field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{cfe27109-d7e1-4691-827d-9174c1d9930e}sharepointFileId',
                    operator: "is null"
                  )
                ),
                a!localVariables(
                  local!currentStrategyDocumentAccess: index(
                    local!loggedInUserInternalDocumentAccess,
                    wherecontains(
                      index(
                        local!refStrategies['recordType!{dff8e999-caf0-43fe-b1d4-aca96cba3448}LPP Strategy.fields.{00d3bf64-39b6-424d-bcf4-53d1af97a033}segmentId'],
                        wherecontains(
                          tointeger(
                            fv!item['recordType!{dff8e999-caf0-43fe-b1d4-aca96cba3448}LPP Strategy.fields.{fac99f27-0c1f-4353-a054-f7ea3e30619e}strategyId']
                          ),
                          local!refStrategies['recordType!{dff8e999-caf0-43fe-b1d4-aca96cba3448}LPP Strategy.fields.{fac99f27-0c1f-4353-a054-f7ea3e30619e}strategyId']
                        ),
                        {}
                      ),
                      tointeger(
                        local!loggedInUserInternalDocumentAccess['recordType!{0379e5a8-eb87-4ab5-a4a0-b07814b2c760}LPP Internal Document Access.fields.{b3c070dd-ab4d-42c8-b7f1-4a69bf32521b}segmentId']
                      ),
    
                    ),
                    {}
                  ),
                  local!currentInvestorVehicles: index(
                    local!loggedInUserInvestorVehicles,
                    wherecontains(
                      tointeger(
                        fv!item['recordType!{dff8e999-caf0-43fe-b1d4-aca96cba3448}LPP Strategy.fields.{fac99f27-0c1f-4353-a054-f7ea3e30619e}strategyId']
                      ),
                      tointeger(
                        tointeger(
                          local!loggedInUserInvestorVehicles['recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{4280b65e-545f-4b2e-bce2-9fd614900824}legalEntity.relationships.{22a37ece-614c-430c-ab07-ac5bad04e569}fund.relationships.{42e12320-aa7f-4540-939a-f50af1287803}strategy.fields.{fac99f27-0c1f-4353-a054-f7ea3e30619e}strategyId']
                        )
                      )
                    ),
                    {}
                  ),
                  a!queryLogicalExpression(
                    operator: "AND",
                    filters: if(
                      a!isNullOrEmpty(local!currentStrategyDocumentAccess),
                      a!queryFilter(
                        field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{cfe27109-d7e1-4691-827d-9174c1d9930e}sharepointFileId',
                        operator: "is null"
                      ),
                      a!queryFilter(
                        field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{e51c8158-e191-40ff-8328-2fe57fbdb43d}documentCategory',
                        operator: "in",
                        value: a!flatten(
                          local!currentStrategyDocumentAccess['recordType!{0379e5a8-eb87-4ab5-a4a0-b07814b2c760}LPP Internal Document Access.relationships.{a359a8f8-fb42-442c-84e1-6ed3bb9e691d}internalDocumentAccessCategory.relationships.{f2c00d9a-060a-4f4e-803d-3a69d53f65c6}documentCategory.fields.{daf628cd-2e01-43f9-8c75-182c69594061}documentCategoryCode']
                        )
                      ),
    
                    ),
                    logicalExpressions: a!queryLogicalExpression(
                      operator: "OR",
                      filters: if(
                        a!isNullOrEmpty(
                          fv!item['recordType!{dff8e999-caf0-43fe-b1d4-aca96cba3448}LPP Strategy.fields.{8bc4622a-8c0e-4fb0-bf3a-dcfb9d0b3a98}dealcloudId']
                        ),
                        {},
                        a!queryFilter(
                          field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{fb82568b-4b43-402e-b313-0caa969f92b5}strategyId',
                          operator: "=",
                          value: fv!item['recordType!{dff8e999-caf0-43fe-b1d4-aca96cba3448}LPP Strategy.fields.{8bc4622a-8c0e-4fb0-bf3a-dcfb9d0b3a98}dealcloudId']
                        )
                      ),
                      logicalExpressions: {
                        /*Investor Account Specific Documents  */
                        a!queryLogicalExpression(
                          operator: "AND",
                          filters: {
                            if(
                              a!isNullOrEmpty(
                                local!currentInvestorVehicles['recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.fields.{1245b7c3-b10c-419a-a9d3-db25ac758c51}dealcloudId']
                              ),
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{cfe27109-d7e1-4691-827d-9174c1d9930e}sharepointFileId',
                                operator: "is null"
                              ),
                              {
                                a!queryFilter(
                                  field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{99118186-5022-4996-b5e5-264ca9e850dc}investorAccountId',
                                  operator: "in",
                                  value: local!currentInvestorVehicles['recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.fields.{1245b7c3-b10c-419a-a9d3-db25ac758c51}dealcloudId']
                                ),
                                a!queryFilter(
                                  field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{b198d5a7-17e2-4eb2-a1c6-935254e48e6e}investorVehicleId',
                                  operator: "is null"
                                )
                              }
                            ),
    
                          }
                        ),
                        /*Group Specific Documents  */
                        a!queryLogicalExpression(
                          operator: "AND",
                          filters: {
                            if(
                              a!isNullOrEmpty(
                                local!currentInvestorVehicles['recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.fields.{1245b7c3-b10c-419a-a9d3-db25ac758c51}dealcloudId']
                              ),
                              a!queryFilter(
                                field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{cfe27109-d7e1-4691-827d-9174c1d9930e}sharepointFileId',
                                operator: "is null"
                              ),
                              {
                                a!queryFilter(
                                  field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{0651bf53-e0f6-4dd6-8979-9e9bfe0b34c4}groupId',
                                  operator: "in",
                                  value: local!currentInvestorVehicles['recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.relationships.{e6992d3d-2461-4b25-89b7-d926d42a52a7}client.fields.{dea3ce41-1623-498e-8c4e-f91e254f5185}dealcloudId']
                                ),
                                a!queryFilter(
                                  field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{99118186-5022-4996-b5e5-264ca9e850dc}investorAccountId',
                                  operator: "is null"
                                )
                              }
                            )
                          }
                        )
                      }
                    )
                  )
                )
              )
            )
          )
        )
      )
    )
    
    
    
    
    
    
    
    --------LPP_ER_TpaSharepointFilter--------------------------
    
    a!localVariables(
      local!strategyIds: rule!LPP_ER_GetStrategiesForUser(user: loggedInUser()),
      local!strategies: rule!LPP_QR_QueryStrategy(strategyId: local!strategyIds, ),
      local!funds: rule!LPP_QR_QueryFunds(strategyId: local!strategyIds),
      local!legalEntities: rule!LPP_QR_QueryLegalEntities(
        fundId: local!funds['recordType!{5687424b-b4e7-48fe-bcd8-f3dd1bd17814}LPP Fund.fields.{b6d90811-725b-4aa2-b7af-1ecc91eb813b}fundId']
      ),
      local!investorVehicles: rule!LPP_QR_QueryInvestorVehicles(
        fields: {
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account',
          'recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.relationships.{e6992d3d-2461-4b25-89b7-d926d42a52a7}client'
        },
        legalEntityId: local!legalEntities['recordType!{80f538b0-9b66-4fae-8032-70af9d696d05}LPP Legal Entity.fields.{bfed8a1c-73bc-4b96-bb11-dd678a823055}legalEntityId']
      ),
      a!queryLogicalExpression(
        operator: "OR",
        filters: {
          /*All users should see general documents, regardless of their Investor Account access and document category access*/
          a!queryFilter(
            field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.fields.{e93a822c-97af-45ad-af9e-f1243871ccbe}isGeneralDocument',
            operator: "=",
            value: true()
          )
        },
        logicalExpressions: a!queryLogicalExpression(
          operator: "OR",
          filters: /*  TPA user must have access to the strategy to which the document is attached  */
          a!queryFilter(
            field:  'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{fb82568b-4b43-402e-b313-0caa969f92b5}strategyId',
            operator: "in",
            value: local!strategies['recordType!{dff8e999-caf0-43fe-b1d4-aca96cba3448}LPP Strategy.fields.{8bc4622a-8c0e-4fb0-bf3a-dcfb9d0b3a98}dealcloudId']
          ),
          logicalExpressions: {
            /*  Investor Account Specific Documents  */
            a!queryLogicalExpression(
              operator: "AND",
              filters: {
                a!queryFilter(
                  field:  'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{99118186-5022-4996-b5e5-264ca9e850dc}investorAccountId',
                  operator: "in",
                  value: local!investorVehicles['recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.fields.{1245b7c3-b10c-419a-a9d3-db25ac758c51}dealcloudId']
                ),
                a!queryFilter(
                  field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{b198d5a7-17e2-4eb2-a1c6-935254e48e6e}investorVehicleId',
                  operator: "is null"
                )
              }
            ),
            /*  Group Specific Documents  */
            a!queryLogicalExpression(
              operator: "AND",
              filters: {
                a!queryFilter(
                  field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{0651bf53-e0f6-4dd6-8979-9e9bfe0b34c4}groupId',
                  operator: "in",
                  value: local!investorVehicles['recordType!{dc8ad427-703e-4e20-a68c-d859b9ca0bca}LPP Investor Vehicle.relationships.{e5a3c592-c5f6-4c44-86ef-6e1523aa9f38}account.relationships.{e6992d3d-2461-4b25-89b7-d926d42a52a7}client.fields.{dea3ce41-1623-498e-8c4e-f91e254f5185}dealcloudId']
                ),
                a!queryFilter(
                  field: 'recordType!{00ae8118-a4b2-4886-b85f-89bedbbbc8e3}LPP SharePoint Document.relationships.{5ba7bb56-392e-4b83-a7f8-194a83494986}sharepointDocumentTag.fields.{99118186-5022-4996-b5e5-264ca9e850dc}investorAccountId',
                  operator: "is null"
                )
              }
            )
          }
        )
      )
    )
    
    
    
    
    
    

Children