Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

How do I check for values in columns and render on page when a value exists?

(0) ShareShare
ReportReport
Posted on by 634

Perhaps this is the wrong wording for this question but here is what I am trying to do.

 

  1. I have a data source with multiple columns. Each column represents a parameter that will get appended to a URL that is also entered by the user into the data source.
  2. Not all records will have a value for each parameter. Some will be blank.
  3. The output needs to include the base URL and any parameters that exist for that record.

NOTE:  I have not come to a conclusion whether or not the final URL(base URL + parameters) is assembled and then written to the data source or if these URL are assembled at the time for viewing/rendering. If I assemble and write to the data source then this question is moot.

 

What I need to be able to do, if I am assembling the final URL on the fly for rendering is the following:

 

  1. Output the base URL
  2. Append a '?' is a '?' does not exist in the base URL otherwise append a '&' (fairly simple using If("?" in ThisItem.'Base URL', "&","?")
  3. Append the value of each column to the base URL if a value exists using an ampersand.
  4. Be aware when it gets to the last column with a value and drop the ampersand.

 

Make sense?

Categories:
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at
    Re: How do I check for values in columns and render on page when a value exists?

    @Future_Vision 

     

    After the result from #2 is done, presuming the result is a Table, something along the lines of the below

     

    (some of the below may be in pseudocode form to get the idea, please test and adjust it where needed when actually using it):

    For #3 :

    ForAll (YourTable, If(!isBlank(Value),Concat(Value,"&"),""))

    For #4 - to remove the last character :

     

    Set(_SomeVar,ForAll (YourTable, If(!IsBlank(Value),Concat(Value,"&"),"")));
    Set(_SomeVar,Left(_SomeVar,Len(_SomeVar) - 1)) 

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,618 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,962 Most Valuable Professional

Leaderboard