Question
Hi,
I am trying to search within a form field (meta data) which value is a coma separated text. I am trying to find that form, the meta field, and at the end to search its value for a specific text. It is important to note that the coma separated text is actually a text generated by the form multiple check boxes which have been selected.
When I am using simple search of forms meta data it finds the text 'PSL' and works fine – code example:
|*Name* |*FPGAExperience*| *Topic* | *SystemVerilog*|*PSL*|*Specmen*|*Vera*|*DevelopmentPreferences*|
%SEARCH{"META:FIELD.*[L]anguageTool.*[P]SL" regex="on" scope="text" nosearch="on" nototal="on"
format="| <nop>$formfield(Name) | <nop>$formfield(FPGAExperience) | <b>[[$web.$topic][$topic]]</b> |<nop>$formfield(LanguageTool) | PSL | | | <nop>$formfield(DevelopmentPreferences) |" web="Sandbox"}%
But when I try to nest the search within a search than it report hits all the time even if the meta field value doesn't have the 'PSL' text I am searching for.
|*Name* |*FPGAExperience*| *Topic* | *SystemVerilog*|*PSL*|*Specmen*|*Vera*|*DevelopmentPreferences*|
%SEARCH{"FPGADesigner;FORM.*name=\"DessTestForm\"" scope="text" regex="off" nosearch="on" nototal="on"
format="| <nop>$formfield(Name) | <nop>$formfield(FPGAExperience) | <b>[[$web.$topic][$topic]]</b> |<nop>$formfield(LanguageTool) | $percntSEARCH{ \"META\:FIELD.*LanguageTool.*PSL\" format=\"PSL\" regex=\"on\" scope=\"text\" nosearch=\"on\" nototal=\"on\" }$percnt | | | <nop>$formfield(DevelopmentPreferences) |" web="Sandbox"}%
Is this a known problem or I am doing somthing wrong?
Thanks
Environment
--
DessislavValkov - 29 Sep 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
so, you could use the
$FIND() function from the
SpreadSheetPlugin to look for a piece of text within another. What you do from there depends on what you want to do with the results. This way you don't need another search though, just take the formfield containing the comma separated list and run it through
$FIND()
--
MatthewCardozo - 06 Oct 2006
I am not sure I understand exactly what you want to do, I assume to output 'PSL' (if the field contains it as part of a comma delimited list), else not to output anyhing. In this case I'd go for a CALC as Matthew suggests. Something like this untested example:
format="| ... | $percntCALC{$LISTIF($EXACT($item, PSL), $formfield(LanguageTool))}$percnt | ... |"
--
PeterThoeny - 28 Nov 2006