Skip to main content
Legend
November 27, 2023
Answered

Way to use Find to locate a specific text variable?

  • November 27, 2023
  • 3 replies
  • 1629 views

Hi. Using ID 19.0.1 with Win 11/updated.

I've used a text variable for the product name: "use a <Vapid-20> thingie to...." Why? The client likes to change the names of things mid-project.

But they got me this time. They changed it to a name beginning with a vowel. Now it's the <Avapid-20>. I can instantly change the product name everywhere by editing the variable, but everywhere I said "use a Vapid-20" it now has to be "use an Avapid-20." English.

Is there any way to search/find a text variable? 

I suppose I could then use GREP or even scripting to change the word just before it if needed... but I have to find it first.

As always, thanks to the community.

-j

Correct answer John D Herzog

You can find search the text variable. you just click on the @ drop down next to the text field and insert the correct special character for your variable. The problem is that you can not replace with a text variable. So either you would have to replace your text variable with the actual text for the name, or you would need to just search and manually adjust the article.

3 replies

Robert at ID-Tasker
Legend
November 29, 2023

Maybe a different approach - a bit simpler and more bullet proof solution - two variables? 

 

One, when product's name is "alone" - like in the title. 

 

Another - when in text - so you can add "a" or "an" as part of the variable's content? 

 

John D Herzog
Inspiring
November 29, 2023

Was thinking about that as well. We just don't know how many text variables they are already juggling. We know it is more than just the product name. If they have a lot of them, a simple script that checks the first letter of all their variables might cause less headaches.

 

Anyway this is all theoretical since I think the OP is done with this topic.

Robert at ID-Tasker
Legend
November 27, 2023
John D Herzog
John D HerzogCorrect answer
Inspiring
November 27, 2023

You can find search the text variable. you just click on the @ drop down next to the text field and insert the correct special character for your variable. The problem is that you can not replace with a text variable. So either you would have to replace your text variable with the actual text for the name, or you would need to just search and manually adjust the article.

NedlawAuthor
Legend
November 27, 2023

This is a 98% solution -- thanks. I did not know this existed. I'm using several custom-text variables, and this finds them all... but it's better than searching for the letter "a." 🙂

-j

John D Herzog
Inspiring
November 27, 2023

You could get 100% with Robert's suggestion of checking the textVariableInstances for the correct variable and then checking in the parent text object of the correct variable for an " a " at it's index-3. then you would have to insert the "n" at it's index-1 of the parent text object.