Ask a Question

How do I convert a text variable to a wildcard?

SOLVED
Morgan
Frequent Contributor

How do I convert a text variable to a wildcard?

I'm sure this is basic but I can't figure it out...

 

I am trying to feed in a file name as a variable to a subroutine and I only want to look for PART of the extended name so I have it surrounded by asterisks.  However, the asterisks are relayed as asterisks and the script doesn't hunt for the text within it.  Any ideas?  It looks similar to the following...

 

ProjectName := 'ABC'

 

RestoreProject('*'+ProjectName+'*',ProjectName); 

 

This is read as the text of *ABC*, which doesn't do me any good.

 

I've tried VarToStr but the result is still the same... I need the quotes or else TC errors.  What am I doing wrong here?

 

Thanks,

Morgan

1 ACCEPTED SOLUTION

Accepted Solutions
Marsha_R
Community Hero

Re: How do I convert a text variable to a wildcard?

I would pass ProjectName as a whole string.  Inside the subroutine you can use aqString to pick it apart and/or search for it within another string.

 

http://support.smartbear.com/viewarticle/59414/

 

 


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

View solution in original post

2 REPLIES 2
Marsha_R
Community Hero

Re: How do I convert a text variable to a wildcard?

I would pass ProjectName as a whole string.  Inside the subroutine you can use aqString to pick it apart and/or search for it within another string.

 

http://support.smartbear.com/viewarticle/59414/

 

 


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

View solution in original post

Morgan
Frequent Contributor

Re: How do I convert a text variable to a wildcard?

Oh... I like that idea.  Thank you!  

cancel
Showing results for 
Search instead for 
Did you mean: