Filtres multiples dans une gallerie
-
Filtres multiples dans une gallerie
Hello,
J’ai plusieurs filtres à appliquer sur une gallerie. Je souhaites que les filtres s’appliquent de manière autonôme sur ma gallerie, c’est à dire que l’utilisateur ne devrait pas être obligé de renseigner tous les filtres avant d’obtenir un résultat. C’est là où j’ai un souci actuellement, car je n’arrive à obtenir un resultat qu’une fois que tous les critères de filtres soient renseignés.
Quelqu’un pourrait m’aider pour ajuster cela ?
Merci
Voici mes codes :
SortByColumns(n AddColumns(n If(n // Case 1 : Check if connected user is a simple usern varResetFilter And varSimpleUser,n Filter(n colDGRequest,n Author.Email = User().Emailn ),n varResetFilter=false And varSimpleUser,n Filter(n colDGRequest,n Author.Email = User().Email,n //Filter by deployment date : n Planneddeploymentdate >= varPeriodFrom,n Planneddeploymentdate < varPeriodEnd,n //Filter by deployment lead ( case sensitive) so you need to make two compared values in the same formatn Proper(Deploymentlead.DisplayName) = ddDeploymentLead.Selected.Result,n //Filter by Project solution name n Project_x002f_solutionname.Value = ddSolutionName.Selected.Result,n //Filter by statusn Status.Value = ddStatus.Selected.Value,n // Filter by sites updated : check if the filter is empty or Blank to display default value based on other filter criteriasn Or(n IsBlank(cbSitesUpdated.SelectedItems),n IsEmpty(cbSitesUpdated.SelectedItems),n CountRows(n Filter(n cbSitesUpdated.SelectedItems,n Value in Sitesupdated.Valuen )n ) > 0n )n ),n // Case 2 : Check if connected user is not a simple user, i.e an IRM or Reviewern varResetFilter=true And varSimpleUser=false, colDGRequest,n Filter(n colDGRequest,n //Filter by deployment date : n Planneddeploymentdate >= varPeriodFrom,n Planneddeploymentdate < varPeriodEnd,n //Filter by deployment lead ( case sensitive) so you need to make two compared values in the same formatn Proper(Deploymentlead.DisplayName) = ddDeploymentLead.Selected.Result,n //Filter by Project solution name n Project_x002f_solutionname.Value = ddSolutionName.Selected.Result,n //Filter by statusn Status.Value = ddStatus.Selected.Value,n // Filter by sites updated : check if the filter is empty or Blank to display default value based on other filter criteriasn Or(n IsBlank(cbSitesUpdated.SelectedItems),n IsEmpty(cbSitesUpdated.SelectedItems),n CountRows(n Filter(n cbSitesUpdated.SelectedItems,n Value in Sitesupdated.Valuen )n ) > 0n )n )n ),n "SolutionName",n Project_x002f_solutionname.Value,n "DeploymentLeadName",n Deploymentlead.DisplayName,n "ReleaseType",n Releasetype.Value,n "SitesUpdated",n Sitesupdated,n "ModifiedBy",n Editor.DisplayName,n "ReleaseVersion",n Title,n "StatusValue",n Status.Value,n "DeploymentDate",n Planneddeploymentdaten ),//Sort by solution Namen "SolutionName",n If(n SortDescending1,n Descending,n Ascendingn ),n // Sort by release typen "ReleaseType",n If(n SortType,n Descending,n Ascendingn ),n // Sort by Release versionn "ReleaseVersion",n If(n SortVersion,n Descending,n Ascendingn ),n //Sort by Status Valuen "StatusValue",n If(n SortStatus,n Descending,n Ascendingn ),n // Sort by Modified byn "ModifiedBy",n If(n SortModified,n Descending,n Ascendingn ),n //Sort by Deployment Leadn "DeploymentLeadName",n If(n SortDepLead,n Descending,n Ascendingn ),n //Sort by Planned deployment daten "DeploymentDate",n If(n SortDepDate,n Descending,n Ascendingn )n)
PostID=HZqsIgQNZc6bm1J
Connectez-vous pour répondre.