I have a “wordPad” part in a webpage, and according to some conditions, I should to keep or remove some paragraphs.
So I extracted each paragraphs of interest, each one associated to one variable and my problem now is to know how with an “Assign” or other, activity, I can to remove a paragraph please.
What is the criteria that determines if the paragraph stays or goes? I would probably compile the text into one variable after making sure it meets the conditions:
1- In a first time I extract some information’s on a person (country…)
2- After that, I have a letter associate to this person and according to these information’s I should to (or not) remove some paragraphs.
For example: If the “relocation” = No then I remove the paragraph on the relocation (that I extract and associate with a variable).
Please let me know if I understand correctly. You have a list of people and the countries they are located in. You then want to assign certain paragraphs to them based on their location. I’m assuming these paragraphs would then be used for correspondence?
First step:
I have a candidate page with his country, salary, offer letter template, relocation…
I extract these informations with an out argument
Second step:
Then I open his/her offer letter page(I can to send you a screen if you want, I can’t post it for all).
As you can see, there is a “wordpad” section where there is the offer letter.
And according informations extract in the first step I need to remove or not the paragraph N° x…
So if in the first step, I have “relocation” = No, I should, in the second step, remove the paragraph on the relocation.
So do you have those headers are same in both first step and second step.?
Like Relocation in step one and a paragraph called relocation.?
IF yes then you can create variable for each paragraph
if(Reloaction[from firststep].tostring.length>0) or particular condition like if(Reloaction[from firststep].tostring.equals(""No)) then remove relocation(index till the next paragraph).
No it’s not the same headers. I use an out argument in a first step and I introduce this value by an in argument in the second step. This ok for my argument and variable headers.
My requirement it’s just how can I remove a part of text after to identify it. My conditions… are clear.
Hi @Divyashreem,
Since your last post here, I did a lot of trials as
Var C = VarC.ToString.Remove(VarC)
Var C = VarB.ToString.Remove(VarC)
Var C = VarA.Replace(VarB, " ")
…
unsuccesfully
WIth
My Variable A is the text
My Variable B the paragraph to delete if the condition is not true
My Variable C is the text without “paragrpah B”
Maybe you can let me know. I suppose I missed something.
Did u assigned the paragraph that u wanna remove, to a variable?? I think then u can replace it with null. so better check your condition works properly or not. And also test the replace or remove function is working without your conditions.
Yes, as I detailled (as an exmple) in my post before your first message:
My paragraph is assign to my variable “VarB”. And then I tested remove and replace functions, unsuccessfully.
Look the combination, maybe I forgot something or the syntax is wrong, but I don’t think so.
Unfortunately he doesn’t work. The Assign is correct because not faulted but the paragraph is not remove
Do you think @nyusuf it could be due to it’s in a subwindow in the web page as below (sorry some info are confidential):