I have to delete the row which is coming after the word summary, but it should meet the condition
Input:
Field1 |
####123.54#21#INR |
####Summary |
####213,54.0123#TKU |
####1453#Alex#458956 |
####Summary |
####1452#USD |
####7845#INR |
Condition:
1. Condition is whenever I find a row which has a summary in it I have to delete the below rows till they have 5 # sings if it contains less than 5 signs then stop.
Output:
Field1 |
####123.54#21#INR |
####1453#Alex#458956 |
Why does your output not include the last two records that have 5 # signs?
####1452#USD |
####7845#INR |
Would you mean that the Number of # is not 5 but 6?
I think that this is the workflow that you would need.
If you want to make a decision across the records, Multi-row formula is work well.
1st multi-row formula:
IF Contains([Row-1:Field1],"Summary") OR Contains([Field1],"Summary") THEN "True" ELSE "False" ENDIF
At this tool, I marked the row contain "Summary" or the row that have it at the before record.
2nd multi-row formula:
IF [Row-1:IsDelete] AND REGEX_CountMatches([Field1], "#")>=6 THEN
"False"
ELSEIF [Row-1:IsDelete] AND REGEX_CountMatches([Field1], "#")<=5 THEN
"True"
ELSE
[IsDelete]
ENDIF
If the previous record is marked, count the number of #'s and re-mark it.
User | Count |
---|---|
107 | |
85 | |
76 | |
54 | |
40 |