This question about Using an extension: Asked

VarSearch and ExplicitNumberingPlugin

I try this search but wiht the plugin didn't work my search:
%SEARCH{web="NET/InternetWeb" topic="Sn*" scope="all" type="query" search="%IP%##IP#." format="<b>$formfield(Server)</b>"}%

I set a IP as a variable like this:
Set IP = 192.168.1.

I got a error: Could not perform search. Error was: Syntax error in '4' at '5'

My goal is that I make a table whit IP addresses and dynamic create it with this extension and search than.

-- TobiasVincze - 06 May 2024

The first issue is that for the search type "query", you need to use QuerySearch query string (the "search" parameter) which includes a reference for form fields or other meta-data and the string to find. The next issue is that if you were trying to do a QuerySearch, the string "%IP%##IP#." does not fit any of the search string syntax for queries.

If you can explain further what string you're looking for and where it would be found, we can help you craft the search string. Are you looking for a reference to the ip string anywhere in the topic text? In that case, the query string might look something like text~'%IP%*IP*'.

-- LynnwoodBrown - 06 May 2024

My goal is that I make a search with IP addresses and the result is a table. I have IPs from 192.168.1.x ; x = 1 - 30. But I would not make a list with 30 search and every time change the IP in the search command. I will do it automatically. that I only add two parameters:
  1. what is the IP: 192.168.1.
  2. what is the range form the IP : 1 - 30

-- TobiasVincze - 07 May 2024

Ok, that sound good. Where will the IP be found? Are they in the body of the topics or in the name of the topics or in some field in a data form assigned to topics?

-- LynnwoodBrown - 07 May 2024

The IPs are in different topics and in the topic in a template.
The IPs are in a template and I will get the Servername. format="$formfield(Server)"

-- TobiasVincze - 07 May 2024

I try it also this :
%CALC{"$WHILE($counter<=30, %IP%$counter )"}% 

But than I got a line with the IPs and I can not search to each one.

-- TobiasVincze - 07 May 2024

Okay I have now the solution but I don't know why not working so the ExplicitNumberingPlugin. frown, sad smile
%SEARCH{search="##." web="NET/InternetWeb" topic="Sn*" scope="all" type="text" }%
I found a solution (if it is good or not, I don't know, but works) :
1. %CALC{"$SET(IPA,##IP1#.)"}
2.    * Set IP = 160.44.71.
3. %SEARCH{search="%IP%%CALC{"$GET(IPA)"}%" web="NET/InternetWeb" topic="Sn*" scope="all" type="text" }%

-- TobiasVincze - 09 May 2024
 

QuestionForm edit

Subject Using an extension
Extension ExplicitNumberingPlugin
Version Foswiki 2.1.8
Status Asked
Related Topics
Topic revision: r8 - 09 May 2024, TobiasVincze
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy