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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Detect blank fieds in ...
Power Automate
Unanswered

Detect blank fieds in a list and get the column name of the blank field

(0) ShareShare
ReportReport
Posted on by 14

In a list, i don't manage with power automate to find blank fields and send the title of the row and the column name of the blank field in a email. 

My list has a lot of columns so i am looking for an expression or function. 

currently, apply each value and condition item() equals Null always replies false so my email is never sent (condition true)

Categories:
I have the same question (0)
  • cmht Profile Picture
    82 on at

    Hi @od2023 

    You are probably running your condition against an array, which will never be empty.

    This is because you are using item()

    You should use item()?['value'] -> to check the column, because now you are checking if the whole "row of columns" is empty. I am sure SharePoint disallows creating such empty entires.

     

    What is the purpose to check the blank fields and send them by email? It would be easier to make a field required to avoid them being empty?

     

    But if you still want to do this:

    You have to do a conditional check on each column.

    Initialize array variable. When a column is empty, append column name value to the array -> so array will keep "Column #3 was blank; Column#6 was blank".

    Later you can send your array by email.

     

  • fchopo Profile Picture
    8,003 Moderator on at

    Hi @od2023 

    You have different options.

    1) items('apply_to_each')?['Title'] is equal to string('')

    2) empty (items('apply_to_each')?['Title']) is equal to true

    Hope it helps!

    Ferran

     

     

  • od2023 Profile Picture
    14 on at

    You are talking about the condition value ?

     

  • od2023 Profile Picture
    14 on at

    Hello

    I have maybe 250 columns so I would like to avoid to do a conditional check on each of them

    Is there another way with a function or an expression ?

  • od2023 Profile Picture
    14 on at

    I still get an expression false but I have renamed the the title to Contrat. Does it matter ?

     

  • cmht Profile Picture
    82 on at

    Hi @od2023 

    I don't have a complete solution for you, but:

    1. HTTP request to SharePoint to get all column names:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-get-columns-name-from-sharepoint-list/m-p/801015#M255709

    of course skip the part with PowerApps.

    You end this with an array variable containing all column names, of course as described I would select to skip default Microsoft columns.

     

    Now apply to each column name -> check if it is empty -> and append empty value to other array. [like row#1 , Column#2 empty, Column #6 empty]

  • od2023 Profile Picture
    14 on at

    Thanks. But I would have to do an apply to each of the 250 column name ?

     

  • Chriddle Profile Picture
    8,436 Super User 2025 Season 2 on at

    Add such a property "HasEmptyCols" with a Select (and filter the outcome):

    Chriddle_0-1703088638026.png

     

    addProperty(
    	item(),
    	'HasEmptyCols',
    	greater(
    		xpath(
    			xml(json(concat('{"Root":', item(),'}'))),
    			'count(/Root/*[not(text())])'
    		),
    		0
    	)
    )

     

     

    Returns

     

    [
     {
     "Id": "000",
     "Col0": "test",
     "Col1": "test",
     "Col2": "test",
     "HasEmptyCols": false
     },
     {
     "Id": "001",
     "Col0": "test",
     "Col1": "test",
     "Col2": "",
     "HasEmptyCols": true
     },
     {
     "Id": "002",
     "Col0": "",
     "Col1": "test",
     "Col2": "test",
     "HasEmptyCols": true
     },
     {
     "Id": "003",
     "Col0": "test",
     "Col1": "test",
     "Col2": "test",
     "HasEmptyCols": false
     }
    ]

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard