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 / Row not to appear if e...
Power Apps
Unanswered

Row not to appear if empty

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, could you help me with transforming codes I already have? I would need rows on my list (code 1) and in the table (code 2) not to appear if there is nothing chosen in the combo box.  So something like "If Blank, then do not appear". And this should be never applied for the first in table/firs point on the list as it is a must to fill at least one to create a ticket. 2 and 3 are optional. 

 

Attached simple - as is and as it should be 🙂

 

 

 

"<ul>"&
 "<li> "&Concatenate(Concat(xxxCode.SelectedItems,xxx_x0020_Code_x0020_ID,";")," for: ", Concat(Country.SelectedItems,CountryCode,";"))&" </li>"&
 "<li> "&Concatenate(Concat(xxxCode_1.SelectedItems,xxx_x0020_Code_x0020_ID,";")," for: ", Concat(Country_1.SelectedItems,CountryCode,";"))&" </li>"&
 "<li> "&Concatenate(Concat(xxxCode_2.SelectedItems,xxx_x0020_Code_x0020_ID,";")," for: ", Concat(Country_2.SelectedItems,CountryCode,";"))&" </li>"&
"</ul>"&
"<table width='100%' border='1'cellpadding='5' style='border: 1px solid black;border-collapse:collapse'>"& 
"<tr style='background-color:#efefef'>
 <th>Id</th> <th>Job codes</th> <th>Country</th><th>Submitter</th>"&
 "<tr><td> "&1&"</td><td>"&Concatenate(Concat(xxxCode.SelectedItems,xxx_x0020_Code_x0020_ID,";")," </td><td> ", Concat(Country.SelectedItems,CountryCode,";"),"</td><td rowspan=3>", SubmittersName.Text )&" </tr></td>"&
 "<tr><td> "&2&"</td><td> "&Concatenate(Concat(xxxCode_1.SelectedItems,xxx_x0020_Code_x0020_ID,";")," </td><td> ", Concat(Country_1.SelectedItems,CountryCode,";"))&" </tr></td>"&
 "<tr><td> "&3&"</td><td>"&Concatenate(Concat(xxxCode_2.SelectedItems,xxx_x0020_Code_x0020_ID,";"),"</td><td> ", Concat(Country_2.SelectedItems,CountryCode,";"))&" </tr></td>"&
"</table>"& "<br></br>"&

 

 

Is:

list_now.png

 

 

 

 

Should be

list_new.png

 

 

Is

Table_now.png

 

 

 

 

Should be

Table_new.png

 

 

Categories:
  • ganeshsanap Profile Picture
    1,555 on at

    @Anonymous 

     

    Try adding If condition like below for each combo box entry:

     

    If(!IsEmpty(xxxCode.SelectedItems.Value), "<li> "&Concatenate(Concat(xxxCode.SelectedItems,xxx_x0020_Code_x0020_ID,";")," for: ", Concat(Country.SelectedItems,CountryCode,";"))&" </li>")

     

    Similarly add conditions for other combo box as well as table code.


    Please click Accept as solution & 👍 if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @ganeshsanap it does not work. I 'm getting an error that there are some unexpected characters now in the formula.

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Anonymous ,

     

    "<ul>"&
     "<li> "&Concat(xxxCode.SelectedItems,xxx_x0020_Code_x0020_ID&";")&" for: "& Concat(Country.SelectedItems,CountryCode&";")&" </li>"&
     If(!IsEmpty(xxxCode_1.SelectedItems.Value), "<li> "&Concat(xxxCode_1.SelectedItems,xxx_x0020_Code_x0020_ID&";")&" for: "& Concat(Country_1.SelectedItems,CountryCode&";")&" </li>")&
     If(!IsEmpty(xxxCode_2.SelectedItems.Value), "<li> "&Concat(xxxCode_2.SelectedItems,xxx_x0020_Code_x0020_ID&";")&" for: "& Concat(Country_2.SelectedItems,CountryCode&";")&" </li>")&
    "</ul>"

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @gabibalaban Hey, well this code created like even more errors, 16 to be precise and I think this is because part of the original code (which is working perfectly) was dropped...

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Anonymous ,

    The idea was to understand the principle. It is hard to transpose here the formula exactly you needed.

    There was a misspelling in my formula. Can you try it again ?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Does not work unfortunately. I will try to manipulate with the code later and let you know if I found some solution. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi I think I found a partial solution, but have no idea why it is partial only. Could you help me please? My code looks now as below:

    "<ul>"&
     "<li> "&Concatenate(Concat(xxxCode.SelectedItems,xxx_x0020_Code_x0020_ID,";")," for: ", Concat(Country.SelectedItems,CountryCode,";"))&" </li>"&
     If(IsEmpty(xxxCode_1.SelectedItems.xxx_x0020_Code_x0020_ID),"", "<li> "&Concatenate(Concat(xxxCode_1.SelectedItems,xxx_x0020_Code_x0020_ID,";")," for: ", Concat(Country_1.SelectedItems,CountryCode,";"))&" </li>")&
     If(IsEmpty(xxxCode_2.SelectedItems.xxx_x0020_Code_x0020_ID),"", "<li> "&Concatenate(Concat(xxxCode_2.SelectedItems,xxx_x0020_Code_x0020_ID,";")," for: ", Concat(Country_2.SelectedItems,CountryCode,";"))&" </li>")&
    "</ul>"&

     And what I've noticed is that it does work for the second line, but not for the third one and the output looks like that:

    line_2of3.png

     

    I'm guessing that my syntax is incorrect somewhere between the first "If" and ending of the list...

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It appears to me that there is no perfect solution and it is not about the code. I can tell that it is some deeper coding issue within PowerApps. I tried both: IsBlank and IsEmpty and both seem to work/not work in certain situations: IsBlank works fine when initially ComboBoxex are empty and there was no action taken on those (even chosen and cleared)...IsEmpty on the other hand works the opposite - it does what it should once something was chosen in the ComboBox and then cleared. This is all weird, but cannot find anything other explaining why it works for me like that. 

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard