Jump to content

Scripting multiple find requests + omits


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

Recommended Posts

I have a solution, which I would prefer to not display the toolbar (because it looks nicer, restricts functionality, etc.).

I have a button to enter search mode, where the user can then enter their find request. Once here there is also a button to create an additional request so that is not an issue.

 

My issue is that if the new request is to be an omit, how would one do that? In the toolbar there is the option to include/omit, but obviously as I am not wanting to show the toolbar this function is not there. Is this possible without using the toolbar? I can't find anything to change the request type.

Link to comment
Share on other sites

A scripted find using omit would look something like

 

Enter Find Mode

Set Field[someField; "WhatToFind"]

New Record/Request

Set Field[AnotherField; "WhatToOmit"]

Omit Record

Perform Find

 

To prevent incorrect results, it is best to do all the positive finds before the omits.

 

So in addition to your fields(s) to find, you would have field(s) to enter information to omit, or a checkbox to flag an omitted request.

  • Like 1
Link to comment
Share on other sites

A scripted find using omit would look something like

 

Enter Find Mode

Set Field[someField; "WhatToFind"]

New Record/Request

Set Field[AnotherField; "WhatToOmit"]

Omit Record

Perform Find

 

To prevent incorrect results, it is best to do all the positive finds before the omits.

 

So in addition to your fields(s) to find, you would have field(s) to enter information to omit, or a checkbox to flag an omitted request.

 

Thanks for your reply - the omit record step was what I was looking for - made a nice script using this that when a new find request is added it adds 'find' to a variable, and if a new omit request it adds 'omit' then takes appropriate action. It works as expected.

Unsure how to give feedback of which requests are finds and which are omits though, which will be very useful...

Link to comment
Share on other sites

My variable is a list - eg:

 

If there are 2 find requests and 1 omit request, it would be as follows:

 

Find

Find

Omit

 

which I then loop through and if it is Omit, then Omit the request. Not sure how a merge variable would help to display the required info though

Link to comment
Share on other sites

But how are you defining the parameters?  For example, if you were performing a find for male students over 21 who don't live on campus, you would 

 

find age>21

find sex = "M"

omit LivesOnCampus = "Y"

 

Where do you store the >21, ="M", and ="Y" in order to put them in the script ? 

Link to comment
Share on other sites

But how are you defining the parameters?  For example, if you were performing a find for male students over 21 who don't live on campus, you would 

 

find age>21

find sex = "M"

omit LivesOnCampus = "Y"

 

Where do you store the >21, ="M", and ="Y" in order to put them in the script ? 

 

My search script puts it into find mode where the user can enter the requests. There is a 'New Find' and 'New Omit' button that create new requests and track if it is a find or omit. Then there is a perform search script that executes it all. So every search is different and I don't store the search values anywhere

Link to comment
Share on other sites

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