web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Display Documents depe...
Power Apps
Unanswered

Display Documents depending on conditions

(0) ShareShare
ReportReport
Posted on by 82

Hey team,

 

I have a sharepoint list named "Policy Collection Mapping" with fields:

PolicySS.png

(PolicyCollection is a lookup field).

 

I want to display the documents depending on the Policy collection, Approval Status, EffectiveStart and EffectiveEnd.

eg:I will get the PolicyCollection name from my URL. So, if policy collection name = CompanySPOwner then I want to display all the documents under the PolicyCollection name =CompanySPOwner provided the Status= Approved and EffectiveEnd should be > then Today and if Effective End is not given then Effective Start should be<=Today. How can I display the documents depending on these conditions using the documenturl in my powerapp?

Categories:
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @sayalides 

     

    If you want to use the parameters from URL, you can user Param() function to fetch individual keys. Reference: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-param

     

    You can use If condition with multiple conditions to achieve the need:

     

    Filter(DataSource, If(IsBlank(Param("PolicyCollection")),true, 'Policy Collection Name' = Param("PolicyCollection")) && Status= Approved && EffectiveEnd > Today() && If(IsBlank(Param("EffectiveEnd")),StartDate <= Today()))

     

    This is a sample expression, if you need help with the specifics, please share more details so that we might be able to help you better.

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • skd Profile Picture
    82 on at

    Hey @yashag2255 ,

    I want to Filter my datasource and get all the PolicyUrl and display them  [under a specific policy collection] with status="Approved" and EffectiveEnd should be >Today() and Effective Start<=Today();

    Eg:

    My "Policy Collection Mapping" List has fields "Policy Collection", "Approved Status" etc. as shown in the image.So, can you help me to write a command to filter data and get all policy URL under a specific policy collections with the conditions of Approved Status and EffectiveStart and EffectiveEnd.

  • skd Profile Picture
    82 on at

    Hey @yashag2255 ,

    I tried your sample statement but it is giving me error at the line[ PolicyCollection = PC and ApprovalStatus="Approved",saying "invalid argument type]". Please help me solve the issue.

     

     

    Set(PC,"Local Admin Rights");
    Set(UN,"abcd@abcd.onmicrosoft.com");
    
    If(User().Email=UN,Filter('Policy Collection Mapping',If(IsBlank((PC)),true,PolicyCollection= PC && ApprovalStatus="Approved"&& EffectiveEnd > Today() && If(IsBlank("EffectiveEnd"),EffectiveStart <= Today()))))

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard