Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3941 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi all,

This problem was addressed before by other users on this forum but the solutions where not successfull or at least they would not work in my case so i will try to be very clear about it

In my database is a field called "Tagging"

 

This is a check box field that could have more values such as:

Recurrent 2013

Recurrent 2014

Misc 2014

TRTO

TRTO-Performance

... and so on.

I set a variable $tagname with a value form one table and the find is performed in another table.

FIRST ISSUE - When I do a search in a script for $tagname ( value TRTO-Performance ) it is working as expected.
However when I perform this find for TRTO it also finds TRTO-Performance and that is not ok.

 

SECOND ISSUE - When i searc for "Recurrent 2014" it will also give me the records where Recurrent 2013 AND Misc 2014 are checked.

In the find dialog I can set the criteria to ==$tagname (or "=="&$tagname) but that DOES NOT WORK BECAUSE FM is searching for the exact value "$tagname" in the field containing some other values (checkbox set).

 

Is there a way to search for the exact frase within multiple frases and still use the variable for this search.
Thanx for your help.

Posted

I suspect your variable is not being created properly. normally if you were to search "recurrent" it would find both 2013 and 2014. However searching for "recurrent 2014" would only return the records you want.

 

Perhaps viewing the variable in the data viewer might help.

Posted

Hi, thank you.

If there was only one value in the field this would happen, but there are 2 VALUES IN THE FIELD:

 

MISC 2014

Recurrent 2013

 

SO even with the correct variable which is "Recurrent 2014" it brings each field where this MISC 2014 is inside the field with Recurrent 2013.

It does not bring the other fields with "Recurrent 2013" ONLY the fields where there is another value containing 2014 as well.

 

I am trying hard to figure out how to make the script search just for the exact value among the different check box values, regardless of where it might be positioned in the array of values.

Posted

:) Thanks, yes that is what i am trying to do and it would work for me, so this is very close to the correct solution. However, i am having trouble inserting variable value inside the double quotation mark and using it in the "Find..." script, it clears the quotation mark and gives me just the value in the search field, which is no good.

 

I tryed the following combinations none of them worked ($tagname is the name of the variable that i need to use in the search):

Set Field ... ""&$tagname

Set Field... ""&$tagname&""

Set Field... " "&$tagname

 

and so on... Whatever i put it returns only a variable in the search field without quotation marks. I am looking for the a way to do this with the variable value inside the double quotation marks in the search proceedure, like i would do it if i wanted to search manually for the exact frase. Help please...

Posted

You need to escape the quotes. Try =

""" & $tagname & """

or simply =

Quote ( $tagname )

Note: these two are not strictly the same; if $tagname contains any special characters, the Quote() function will escape them.

Posted

YES, this finally works just as expedted, both of the methods achieve the desired result.

Thank you a milion comment, you saved my day.

This topic is 3941 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.