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 Apps / Issue with decodeUriCo...
Power Apps
Suggested Answer

Issue with decodeUriComponent('%0D') - related to equivalent

(1) ShareShare
ReportReport
Posted on by 2
Hello,
 
I am requesting assistance to resolve the issues with “Handle empty data scenarios in CSV file” that related to “/r equivalent” from YouTube by Reza Dorrani. I followed step by step until I ended up having issues at frame time, 23:35 that includes with a snapshot. that was the last thing that I need help before I can finished up to the last session. I enjoyed learning the processes how the Power Automate can apply to the projects that I am working on.
 
Handle empty data scenarios in CSV file

Column Index [7] = Creation Date
1. 22:45 - split(item(),',)?[7] - no issue
2. 22:51 - if(equals(split(item(),',')?[7],''),null,split(item(),',')?[7]) - no issue
3. 23:35 - if(equals(replace(split(item(),',')?[7],''),decodeUriComponent('%0D'),''),null,split(item(),',')?[7]) - failed, the issue occurred - related to /r equivalent
where I saw double apostrophes such as if(equals(replace(split(item(),',')?[7],''),decodeUriComponent('%0D'),''), ''
then the rest of expression cut off before you clicked "Update" button. I was unsure if the power expression statement is correct since it failed at multiple times.
 
if(equals(replace(split(item(),',')?[7],decodeUriComponent('%0D'),''),'',null,split(item(),',')?[7]))
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
    Hi,
     
    So question, you are trying to remove the index [7] which you say is an /r , now is the file holding a /r or is it just that you know they are there?
     
    Can you give one line of complete data, so that
     
    Also when I try to put your code into a (not clearner but a format to make clear what goes with what hierarchy wise.
     
    it does not look right to me and here is why
    Let's break it down
     
    1. Why do you check for null after you do the replace? You should check before, otherwise it can fail
    It seems what you WANT is, if that equals then do something but you wrote it incorrectly
     
    if(
       equals(
            // ok so take the index of 7 and replace /r with '' (empty string but NOT null)
            replace(split(item(),',')?[7],decodeUriComponent('%0D'),'')
          '',null,split(item(),',')?[7])
     
    )
     
     Ok lets start our break down
     
    if(equals(replace(split(item(),',')?[7],decodeUriComponent('%0D'),''),'',null,split(item(),',')?[7]))
     
    Ok remember Ifs do the following
    If( something, is true, do x, if not true do y)
     
    But you didn't write yours that way. look closely
     
    if(
    // so we need JUST the expression to evaluate between the equals() // but you have a lot more
     
        equals(replace(split(item(),',')?[7],decodeUriComponent('%0D'),'') 
        Problem
         #1 is I need to close the Equals.. but i cannot. The above code closes the REPLACE statement only, so you should have another ) right after close the replace, but you do not, you have an , and then bla bla.. so its like you were trying to do the if(true/false, true, false) but wrote the stuff in the equals section so, I am going to add the ) in my third writeup below
     
     
     
    ,'',null,split(item(),',')?[7])
     
    )
     
    // fixing #3
    if(
    // so we need JUST the expression to evaluate between the equals() // but you have a lot more
     
        equals(replace(split(item(),',')?[7],decodeUriComponent('%0D'),'')) <== I added this to close the equals
       NOW, i can use your next comma,,which belongs to the IF not the equals
     
    // Next Problem. You should have an expression to return or do something, you dno't you have the below stuff left, none of this stuff will work.
    As you see I moved part of it down to represent the False part of the If, the issue is you still have that ", null
    which doesn't make sense. you probably JUST want the 
      null
         //'',null and get rid of this
     
    ,
        // I used the comma right after null, to be the FALSE section of your if
       split(item(),',')?[7])
    )
     
    Clean Copy
    if(
        equals(replace(split(item(),',')?[7],decodeUriComponent('%0D'),''))
    , 
      null
    ,
       split(item(),',')?[7])
    )
     
    And thats where I believe your issue is
     
    If this helps please mark as the answer.
     
     

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard