You can use the .Length property of a text variable to check its length. So, if you use %[dt1][LoopIndex['A']% to get the text, you can do an IF condition to check if %[dt1][LoopIndex['A'].Length% is greater than 50, and if it is - then use the Get subtext action. Otherwise - leave it as it is.
As for the LoopIndex, a data table variable has a .RowsCount property, which @Nived_Nambiar used correctly. It holds the number of rows in the data table. But since indexes are 0-based, what Nived suggested was looping from 0 to RowsCount-1. This is correct and it works better than using a For each loop in your case, because with a For each you would not have an index that is necessary to write back to the data table. If you have no intention on modifying the data table, For each is perfectly fine (and easier to use). But if you want to modify the table, indexes are necessary and then using a simple Loop like the one Nived suggested is a better idea.
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution.
If you like my response, please give it a Thumbs Up.
If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/