Forum Discussion

jwb3d's avatar
jwb3d
Frequent Visitor
1 month ago
Solved

Replace text in table

As a newcomer to Power Automate, I require assistance in replacing text within a table and subsequently saving the results to OneDrive. Source table.   Current steps  
  • Olufemi7's avatar
    1 month ago

    Hello jwb3d,
    The problem is replace() expects a string, but you're feeding it a table/array, and that's not going to work as-is.
    If you just want to swap out every instance of "Record" in the CSV once it's built, do the replace after the Create CSV Table step:
    1. replace(outputs('Create_CSV_table'),'Record','342')
    2.Then feed that into File Content on the Create file action.

    If instead you're trying to change the value in one specific column before the CSV even gets created, you will want a Select action to reshape the array first, then send that into Create CSV table.

    Docs: Use data operations

    Quick question though, are you trying to replace every "Record" in the whole CSV, or just the one in a particular column?