April 27, 201015 yr Hi, I need to script a search function. There are 3 tables: articles (12'000 records) categories --< keywords (one to many relation) Now the user could choose a category and then the script should perform a search on the articles table with the keywords from the relationship. Unfortunately I don't know how to do this thx for any ideas by ChiSao
April 28, 201015 yr Author My idee was to get the portal records in to an array (variable) an then use this as a search string. Unfortunately I don't know how to get the portal records in to one variable.
April 28, 201015 yr Author yeah that works, thxs but now I realize that I can't use it directly as a search string. I would like to do the following: $$searchstring= hand, shoulder, ellbow Search in table "articles" in field "keywords" for hand OR shoulder OR ellbow Is it possible without a loop?
April 28, 201015 yr No, you must have a loop to create a request for each keyword in the list - something like: Set Variable [ $searchValues ; List ( Keywords::Keyword ) ] # Go to Layout [ Articles ] Enter Find Mode [ ] Loop Set Field [ Articles::Keywords ; GetValue ( $searchValues ; Get ( RequestCount ) ) ] Exit Loop If [ Get ( RequestCount ) ≥ ValueCount ( $searchValues ) ] New Record/Request End Loop # Perform Find [ ]
Create an account or sign in to comment