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

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

Recommended Posts

Posted

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

Posted

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.

Posted

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?

Posted

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 [ ]

This topic is 5322 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.