How to create a search with multiple criteria
Hi
I've a table that contain staff information. (name, dept. position, ext, email...etc)
I've created a search page that allow the user to search any field. The result should appear in the same page
first i've created the form:
enter staff First_Name:
enter Dept. :
select position:
submit button
Then I've created the record set that select all the feilds from the table, now i need a help in the criteria, This is what I used:
SELECT *
FROM tblstaff
WHERE First_Name LIKE %colname% AND Dept = coldept
for both colname and coldept
default = 1
runtime value = $HTTP_POST_VARS['First_Name'] - $HTTP_POST_VARS['Dept']
It seems to work fine when i enter all the values in the search form. but what if i left some fields empty? In other word how can I add (All in the drop down menu and accept empty value for the text search)??
can anyone help me?
The simplest way to do this is to add a wildcard character to the end of coldept and make the field optional.
SELECT *
FROM tblstaff
WHERE First_Name LIKE %colname% AND Dept LIKE coldept%
If the department field is left empty, it will match all departments.
By the way, you should not be using $HTTP_POST_VARS or $HTTP_GET_VARS. It's obsolete code, and will break on a modern installation of PHP. Use $_POST and $_GET instead.
Similar Messages
-
I need your expert opinion on how to create a map with multiple conditions.
Hello.
I need your expert opinion on how to create a map with multiple conditions.
I have a procedure (which i cannot import or re-create in OWB due to the bug), so i am trying to create a map instead :-(
How can i create a cursors within the map?
My function creates table and cursor.
Then it will have to check for duplicates in the tables (the one created and another table) - the criteria for finding duplicates is a number of fields.I then need to place few different conditions (if some attributes are not available) and it has to load cursor based on this conditions. The next step is to fetch the data into the cursor based on what attributes are missing.
The next thing it will do is insert the data into table (if record doesn't exist), output the error in separate table is record is corrupted, or update the record with changed information.
In short i need to re-create match / merge but with conditions, iterations etc 'built into' it.
I can read up on available functions - it's just what would be the best options? and what would be the best approach to do so?
In my function i use %rowtype - but cannot use it in owb - so what would be the alternative? i don't really want to create a lot of variables and then have a nightmare of maintaing it. are there any tips regarding this?
having looked through Oracle dedupe - it's not really what i need because it is just DISTINCT.
I would appreciate any help / advise on this.
Thank you very muchthanks a lot for your reply - i will look into this option :-)
it is a bit more complicated now as i have to re-create the match / merge and then somehow 'tweak' it to achieve the result i need.
At the moment i am looking to breakdown the package into smaller chunks 'functions' and try creating the map that way.
Anyway, thank you very much for your suggestion. -
How does create a server with multiple Clients ?
Any people can lead me .
How does create a server with multiple Clients ?
ThanksFor a multithreaded server you will need a thread to listen and at least one thread per client. If the conversation is half duplex, one thread per client works very well, if it's full duplex you will find one thread to send and one to receive much easier to program.
I posted a Simple Socket Server that uses 1+2*clients threads. -
How to create list items with multiple attachment files using rest api javascript
In one of user form I am using javascript rest api to create a list item with multiple attachment files. So far I am able to create list item and once created uploading an attachment file. But this is two step process first create an item and then upload
a file.
It create an additional version of the item which is not desired. Also I am not able find a way to attach multiple files in a go. Following is the code I am using.
createitem.executeAsync({
url: "/_api/web/lists/GetByTitle('UserForm')/items(1)/AttachmentFiles/add(FileName='" + aFile.name + "')",
method: "POST",
contentType: "application/json;odata=verbose",
headers: {
"Accept": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
binaryStringRequestBody: true,
body: fileContent,
success: fnsuccess,
error: fnerror
So somehow I need to combine item attributes along with attachment files in body: param. I visited https://msdn.microsoft.com/en-us/library/office/dn531433.aspx#bk_ListItem but no success.
Appreciate any help.Thanks Mahesh for the reply and post you share it was useful.
But this does not solve the core of the issue. You are uploading attachments after creation of item and multiple files are being attached in loop. This is kind of iterative update to an existing item with attachments. This will end up creating multiple versions.
What I am trying to achieve is to create an item along with multiple attachments in a go. No item updates further to attach a file.
Please suggest how this can be done in one go. SharePoint does it when one creates an item with multiple attachment.
Thanks for your reply. -
How to create a table with multiple select on???
Hi all,
I am new to webdynpro and my requirement is to create a table with multiple selection on.I have to add abt 10 rows in the table but only 5 rows should be visible and moreover a verticalscroll should be available to view other rows.Can anybody explain me in detail how to do that.Please reply as if you are explaining to a newcomer.Reply ASAP as i have to do it today.
ThanxsHi,
1. Create a value node in your context name Table and set its cardinality to 0:n
2. Create 2 value attributes within the Table node name value1 and value2
3. Goto Outline view> Right click on TransparentUIContainer>Apply Template> Select Table>mark the node Table and it's attributes.
you have created a table and binded its value to context
Table UI properties
4.Set Selection Mode to Multi
5.Set Visible Row Count to 5
6.ScrollableColCount to 5
In your implemetaion, you can add values to table as follow:
IPrivate<viewname>.ITableElement ele = wdContext.nodeTable().createTableElement();
ele.setValue1(<value>);
ele.setValue2(<value>);
wdContext.nodeTable().addElement(ele);
The above code will allow you to add elements to your table node.
Regards,
Murtuza -
How to create Item Codes with multiple Item Description
Hi,
for one of my client, we need to create Item Codes with multiple Item Description.
e.g.,
Item Code - M00285
Item Description 1 - Blue Paint
Item Description 2 - Red Paint
Is that possible in SAP Business One? If "Yes" kindly provide a solution. Else recommend an alternative method.
Regards,
Ammheya U. NaaikAmmheya,
I just wanted to add that there is an Add-On that handles "Style, Color, Size" situations like yours.
It allows you to define a "master" item, (Paint, for example) and then setup the various styles, colors and sizes it comes in.
This creates sub-items for each with the master in the ItemCode (Paint-Blue, Paint-Red, etc)
It's called MatrixOne from Navigator. You could find it on the partner portal with other Add-Ons.
Hope thathelps,
Brad Windecker -
How to create a ListDefinition with multiple ContentTypes
Hi,
i need to create a list definition with two contenttypes. When is use the Visual Studio SharePoint ListDefinition from ContentType, i am only able to add one contenttype to the list. But i have two contenttypes. I don't know how to add them to a ListDefinition
(DocumentLibrary).
This is my Contenttype:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Field ID="{1D6C3BF2-5269-4892-B147-659A5EE36BED}" Name="MyChoiceField" DisplayName="MyChoiceField" Type="Choice" Group="MyBox" Hidden="False" Required="False">
<CHOICES>
<CHOICE>-/-</CHOICE>
<CHOICE>Choice1</CHOICE>
<CHOICE>Choice2</CHOICE>
</CHOICES>
</Field>
<!-- Parent ContentType: Document (0x0101) -->
<ContentType ID="0x010100d7d016b413b244e8a6a185cf8b0afd3b"
Name="MyBox Document"
Group="MyBox"
Description=""
Inherits="False"
Version="0">
<FieldRefs>
<FieldRef ID="{1D6C3BF2-5269-4892-B147-659A5EE36BED}" />
<FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Hidden="TRUE" Required="FALSE" DisplayName="_hidden" />
</FieldRefs>
</ContentType>
<!-- Parent ContentType: Folder (0x0120) -->
<ContentType ID="0x012000cdce40c9703b4b5aa7a84044a040c005"
Name="MyBox Folder"
Group="MyBox"
Description=""
Inherits="False"
Version="0">
<FieldRefs>
<FieldRef ID="{1D6C3BF2-5269-4892-B147-659A5EE36BED}" />
</FieldRefs>
</ContentType>
</Elements>
Is there a way to create a minimal schema.xml with these contenttypes manually or what are the steps to build a listdefinition with multiple contenttypes?
Best Regards
Bog
Developers Field Notes | www.bog1.deYou can define them in the schema.xml of list definition.
<?xml version="1.0" encoding="utf-8"?>
<List xmlns:ows="Microsoft SharePoint" Title="Something" Direction="$Resources:Direction;" Url="Something" BaseType="1" xmlns="http://schemas.microsoft.com/sharepoint/" EnableContentTypes="TRUE">
<MetaData>
<ContentTypes>
<ContentTypeRef ID="0x0100707A19136D594D7784D9E30A5FBA58C1002D7898DEE60A4FDEBD3CD1EFAB442000" />
<ContentTypeRef ID="0x0100707A19136D594D7784D9E30A5FBA58C1002D7898DEE60A4FDEBD3CD1EFAB4427A000678E9CDB185C4DCEAC41F865393A1234" />
<ContentTypeRef ID="0x0100707A19136D594D7784D9E30A5FBA58C1002D7898DEE60A4FDEBD3CD1EFAB4427A0007A4D2F6526CA4D8F8B5AD2BD64C3A123" />
</ContentTypes>
<Fields> </Fields>
<Views> </Views> </MetaData>
</List>
--Cheers -
How to create a dashboard with multiple prompts ?????
Dear All,
I need to design a dashboard with multiple prompts, which has been desined from webi.
Ex: i have a prompts of year,sales manager and promotions has prompts in webi report.
I am trying to create a dashboard on top of this webi report; i am also using live office.
how can i design this dashboard with mutiple prompts.
any doc's are links which is related to this topic will be a great help.
Thanks in advance.
Regards,
SumanDear Praveen,
Thanks for your suggestion; i hope we need some third party tool for multiple selection.
But i need to know which kind selectors i can use from the components for multiple selection.
question 1:
Ex:
I have prompt for year;
scenario 1: i need to filter the year by 2001,2002,2003.
or
scenario 2: need to filter the year by only one year 2001.
question 2:
I have created a dashboard on top of webi report; but i have filter for the year in from to value's.
Ex:
Year is from 2001 - 2009.
when i am enabling this prompt in xcelsius i cannot see from and to option; how should i design this one.
Regards,
Suman -
How to create sales return with multiple invoices
Hi ,
I am creating a sales order return with reference of billing document using FM SD_SALESDOCUMENT_CREATE, if i give one Billing document as a reference document it is creating document perfectly.
But my Requirement is to create one Return sales order with multiple invoices.
I tried to pass reference document no's in Item level , but it take first reference document number only , for that reference document only return is creating.
Can you any one help me how to create this.
Thanks in advance
Swapna.Hello Venkat,
As I know it is not possible to create a single return order for multiple invoices in the background.
It is possible in the foreground by following the below steps.
1) Goto VA01 --> enter the Sales order type and Sales area.
2) Press F8 or click on create with reference, provide the first invoice.
3) Now the main screen would appear, displaying line items from Invoice1.
4) Without going back, again goto path, Sales document -> Create with reference
5) Enter second invoice2. and the items from invoice2 will also appear in the Sales order line item.
------ Enter as many number of invoices by repeating the above step--------------------
6) Press save, so one sales order is created for multiple invoices.
Regards,
Thanga -
I have searched high and low on the internet o find a way to
do a search through multple fields but the more I lookthe more i
get confused. here is the problem. i want to do a search where the
user can input a data element and select the matching type and
display he results.below is the code that i have for my search
page, but I am confused about the more important parts of the fom -
the actual search variables.
If you look t the code below you see that I have a test field
named "recordID" and a drop down list named "select".
I want to dispay the results in which 'recordID' looks in
table thatis equal to 'select'.
an example of what I want is at the following link.
http://www.phpscriptsearch.com/DizzDizzy wrote:
> I went to
http://www.webassist.com/professional/products/productdetails=
=2Easp?PID=3D117&CouponID=3Dss2008&RID=3D590&WAAID=3D92
> but i could not find the solution there
Hi Dizz:
Under the banner you'll find links for Overview, Features,
System=20
Requirements, Support. When you click on the Features link,
the MooFX=20
Accordian javascript class runs to update the content on the
page. The=20
bullet points are clickable to similarly update the content
on the page. =
Click on the bullet point "Pro search and sort enhancements"
and read=20
the paragraph at the bottom under the screen shots:
Sophisticated search capabilities
DataAssist integrates the advanced search functionality
previously=20
available in Database Search. Now you can combine advanced
Google-style=20
keyword searches (across multiple database columns) with
price, date or=20
number ranges =96 all without coding.
Please take a look at the feature tour:
http://www.webassist.com/professional/products/featuretour/media_117.asp
As for the Prof's requirements, the form submits two values,
a recordID=20
and a selection to either search by company or by store
number.
If Prof has a table named company and another named store
number, the=20
way you'd search these tables would be to have another table
that=20
contains the selectcategories with a column containing the
values=20
"company" and "storeNumber" along with ID columns that relate
to a=20
categoryID column in the companies table and the storeNumber
column in=20
the Stores table. Using this relationship Prof can create a
reccordset=20
on his results page that returns the values using an INNER
JOIN to=20
combine the tables in the recordset. Similarly by
constructing the=20
relationships properly as to his records (let's say he's
searching 45RPM =
singles - anybody remember those thingies?) His company table
can have=20
an ID column that references his product table where a
companyID is=20
stored. Again, a JOIN statement is used to include the
product=20
information, including the ProductID in the Recordset.
Similarly for the =
Stores table, again, the Products table has a column that
identifies the =
store that carries that productID. If more than one store
carries the=20
product, the column should be a storesID column that
references a=20
ProductStores table which references the stores that carry
the product=20
by a common ID. Again, using the JOIN (this recordset query
would get=20
complex) the necessary data can be returned.
The DataAssist Search Server Behavior applies a sophisticated
WHERE=20
clause to the recordset. so that the requested records can be
returned=20
to the page. Prof is not needing a tool to build database
management, so =
I can see his point... but if this is something you do
regularly,=20
DataAssist will pay for itself over and over in time saved.
And WebAssist is conducting a 50% off sale through next
Friday, so it's=20
a good time to get on board. Here's a link to the discount
page for all=20
the products:
http://www.webassist.com/professional/products/productresults.asp?CouponI=
D=3Dss2008&RID=3D590&WAAID=3D92=20
enthusiastically,
mark haynes. -
How to create Interactive PDF with multiple .mp4 videos– without lagging on playback?
I'm creating a long document with no real effects-- just a "fade" transition from page to page-- and multiple videos. These videos are all formatted as .mp4s, and I have had no issues with the actual process of getting them embedded and playing back on export.
My real issue is that the videos are all extremely laggy on playback. Since this is a presentation document, I'd like to know if there are any options for making the playback a bit smoother. Each video, by itself, plays with no issues. Would the combined filesize of all the videos be causing this? There are about eight 30-second videos and one 2-minute video, which makes the filesize quite large.
Filesize is not an issue, so is there some way to completely embed the videos or create an external folder the PDF document can draw the videos from on playback...? Hopefully I won't be stuck with laggy videos.My suspicion is that computer setup has more to do it than anything. How much RAM, whether other apps are loaded, what kind of graphics chip, stuff like that.
I don't know of a setting, though you can look at the Flash Player settings in Acrobat. There is certainly nothing in InDesign that would affect it. -
How to create the query with multiple node types
Hi,
I am having an issue in creating a query to search multiple node types.
The requirement is to query documents/pages of the type dam:Asset and cq:Page present under a path.
I tried the following code snippet with no luck .
path=/content
1_type=cq:Page
2_type=dam:Asset
property=jcr:content/metadata/@cq:tags
property.1_value=<tag Name>
I was able to write a query with single type. However i could not find any documents/ materials with multipe types as shown above.
Thanks in advance.
Regards
SudhiI don't think multiple type is possible. Instead use super type like nt:base that will cover both page and asset.
Yogesh
www.wemblog.com -
Create Dynamic groups with multiple criteria
Hello,
I want to create a dynamic group of sql computers in a particular domain.
What should be the criteria?
System creates this:
((object is windows computer and (dns domain name equals contoso.com) and true) OR (object is SQL computers and (display name matches wildcard *) and True))
How can I set to below?
((object is windows computer and (dns domain name equals contoso.com) and true)
AND (object is SQL computers and (display name matches wildcard *) and True))
ThanksUse
the link that Blake already supplied to the site of Jonathan and use this XML part.
Replace the XXXXXXXXXX of course with the name of your class/group. Don't forget to add a reference to the SQL Server Core Library Management Pack.
<RuleId>$MPElement$</RuleId>
<GroupInstanceId>$MPElement[Name="XXXXXXXXXX"]$</GroupInstanceId>
<MembershipRules>
<MembershipRule>
<MonitoringClass>$MPElement[Name="Windows!Microsoft.Windows.Computer"]$</MonitoringClass>
<RelationshipClass>$MPElement[Name="SC!Microsoft.SystemCenter.ComputerGroupContainsComputer"]$</RelationshipClass>
<Expression>
<Contains>
<MonitoringClass>$MPElement[Name="MicrosoftSQLServerLibrary!Microsoft.SQLServer.DBEngine"]$</MonitoringClass>
<Expression>
<RegExExpression>
<ValueExpression>
<HostProperty>
<MonitoringClass>$MPElement[Name="Windows!Microsoft.Windows.Computer"]$</MonitoringClass>
<Property>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/DNSName$</Property>
</HostProperty>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>domain.(dev|net)/Pattern>
</RegExExpression>
</Expression>
</Contains>
</Expression>
</MembershipRule>
</MembershipRules>
</Configuration> -
How to create a group with multiple data fields
Post Author: RichS
CA Forum: Formula
Using CR XI. Using CSV input from ODBC text driver. No problems here.
There are 3 fields that I want the same group by action. Is this possible?)
If any one of these 3 fields change I want some header information and column fieldnames to display. The header information I only want displayed on the first page (on the change) and the column fieldnames to display on every page. I have played around with things like "InRepeatedGroupHeader" and "report group header on each page". I am not getting all the results that I am looking for though.
I want report to look like:
Page header stuff (to display on every page) This data consists of some fields that will have static data and will display on every page. And it consists of 3 non-static fields that I want to group on.
Group header stuff that I only want displayed on the first page on a change from one of the 3 fields mentioned above.
Column headings that I want displayed on every page.
Details data
Group footer stuff (details not important for this)
I get the expected output (column headings displayed on every page, and group header stuff display on the first page on each group change) with one group field. But I want the group change to happen for all 3 fields.
It seems simple but I can't find a way to create a "group" so if "field1 or field2 or field3" change, I get the same "group by" action. I just need to know how to get the expected action.
I expect that I might have some terms mixed up and/or some important information that would aide you in helping me. If that is the case please re-post and I will add any missing or mis-stated information.
Thanks,Post Author: V361
CA Forum: Formula
I am slightly confused, but perhaps you can create a formula
Then group on the formula. If this is not what you want, could you post some sample data, with the desired results. -
How to create a VI with multiple windows/displays?
Hi, I'm new to LabVIEW and just trying to increase my understanding so please bear with me.I want to write a VI where the user is presented with a series of windows and depending on the button, different windows are displayed. What would be the best way to implement this? Is there a way to change the Front Panel all in one VI? Or would it be better to do it using SubVIs? Or separate VIs for each window? I've looked at the Open VI Reference and Invoke Node VIs and can see a possible implementation that way, but I'm still curious if this is the best way. I also considered using tabs, but I want the different "windows" to be unique and not tabs. By "windows" I mean when the user clicks a button, a completely different Front Panel is displayed and the previous one is hidden/closed. Thanks for any help.
First. Yes the property "FP Open" is writable during run time. So you can programatically show and hide the front panels of several sub vis that your main "launcher" can control. Another option is to launch sub-vis that are "Modal" so that they act like dialog pop-ups and float to the top until the user performs some action that closes the sub-vi execution. Personally I use this method frequently for actions like setting test options, selecting test vectors or displaying error information to the user.
But I do want to add a caution, Make sure your user can understand what is going on! By that I mean that you must take into account that most applications have one main interface and, your user is used to this behavior in the applications that they run, so this MUST affect your UI design. Unless you want all of your users to start using the phrase "Well, this is a sdsdsding mess!" you can't get very far away from the typical application UI paradigm. If I ran an app that changed panels, and kept closing where I came from, throughout its normal functions I would become frustrated as a user. As the Developer of that App I would know how I coded it and therefore the switching would make sense to me but, the target user is the person that must deal with it. (And you never know when even the code you develop as a "development aid" will have reuse potential and need to be adapted for a large target audience).
Jeff
Maybe you are looking for
-
What can I try if the store's Advanced Search strikes out trying to find the song I want?
-
Decision Service - Failure under stress
After a recommendation from an Oracle consultant, we have decided to use the new Decision engine in 10.1.3.1 instead of using BPEL code to do some business rules. So, we created a simple rule using the rules author and then deployed this onto WebDAV.
-
DMS Connector and DMS Search Problem
Hi all, We have a requirement of connectiing DMS with KM.I have installed DMS Business Package and Configured Repository Manager.Here are the Details Description: DMS Repository Manager Prefix (must start with /):/dmsrm Repository Services:co
-
Beat Mapping/Changing Tempo & Maintaining Automation Timing
If you've ever changed the tempo in a song (beat mapping or other kind of re-clocking), you probably know that it's extremely important to SMPTE-lock your regions before attemping those operation (this way you can adjust the tempo/metronome to confor
-
Anyone having issues coonecting toitunes store via apple tv
gettin a cant connect server try again later message when trying to look at tv or movies on apple tv