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

Community site session details

Session Id : xV9X7ZKwkJa+kc726n9eW0
Power Apps - Building Power Apps
Unanswered

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

Like (0) ShareShare
ReportReport
Posted on 21 Dec 2020 22:14:49 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 22 Dec 2020 at 00:30:33
    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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete