GUI Query Builder for Users

Hey all,
For anyone who was following my last post, I did convince my
boss to buy CF, so epic win there. I am now starting to replace
some our existing software with CF based code. One of the first
things we would like to do is setup a "Query builder" type of
thing. Basically we have a database with over 100 fields in a
particular table. I need some kind of interface that will allow a
user to easily build a complex query that can include any number of
those fields. Before I start reinventing the wheel I was wondering
if anyone had code for something like this already or could point
in the direction of a place that might. All it needs to do is put a
nice front end on an SQL query basically, and really only for the
where statement part of it. We are always going to be selecting the
same info, from the same table, but what records we select will be
very very different. Thanks in advance.

A slightly more fleshed out example: Code is CF8 based, some
features
not compatible with older versions, but easily convertible.
<cfscript>
aTest = [
label = 'foobar',
updateable = false,
type = 'picklist'
label = 'george',
updateable = true,
type = 'int'
label = 'nix',
updateable = true,
type = 'picklist'
label = 'gracie',
updateable = false,
type = 'text'
</cfscript>
<cfdump var="#aTest#">
<cfset FormItems = structNew()>
<cfloop array="#aTest#" index="key">
<cfset aTemp = structNew()>
<cfset aTemp.label = key.label>
<cfset aTemp.updateable = key.updateable>
<cfset aTemp.type = key.type>
<cfif NOT structKeyExists(FormItems,key['type'])>
<cfset FormItems[key['type']] = arrayNew(1)>
</cfif>
<cfset arrayAppend(FormItems[key['type']],aTemp)>
</cfloop>
<cfdump var="#FormItems#">
<cfoutput>
<cfloop collection="#formItems#" item="elemAry">
<h1>#elemAry#</h1>
<cfloop array="#formItems[elemAry]#" index="element">
<p>#element.label# - #element.updateable# -
#element.type#</p>
</cfloop>
</cfloop>
</cfoutput>
Will need some modification to match your situation and there
is some
redundancy that could be eliminated. But should be a good
proof of concept.

Similar Messages

  • Create or find Query builder for mysql or any db

    Ok. Is there a query builder tool out there that will let me create queries on the fly for an application or do I need to build it myself? This is the scenario. I have a client that is in the real estate business, and he wants users to be able to go to his site, query his (mysql)-at the moment db, and get a result set back. I could easily create some queries that would take in a paramater and query the db for it and return result back. But, he wants them to be able to be able to put in specific info. Houses in this certain region, certain number of bedrooms, houses in this price range, etc... I have done a few query statements, but never built a dynamic query tool. What are my options, and/or how would I go about this and what should I use?
    orozcom

    Most query builders I have seen simply allow the user to build an SQL select statement, given a list of tables and the columns in those tables. But you do not want one of those, as the users of the site aren't going to want to write SQL. You need to write some code that takes their selections (e.g. a drop-down box with a list of region codes, a text box for number of bathrooms, whatever) and builds a query from that.
    I think any package that did that sort of thing would be so complex (think Struts for example) that you are better off writing the code yourself.

  • Configure "Query Builder" for Theta-Style Joins over ANSI-Style Joins

    Can SQL Developer be configured to auto generate theta-style joins instead of ANSI-style joins when building queries? This happens when I generate a query using the Query Builder and then switch over to the Worksheet tab to see the SQL code.
    Sample code:
    Theta-style join syntax uses commas to separate multiple table names and creates the joins in the Where clause:
    SELECT c.name
    FROM instructors i, courses c
    WHERE i.firstname = 'Mary' AND i.lastname = 'Williams'
    AND i.course_id = c.course_id;
    ANSI syntax uses the JOIN and ON keywords instead:
    SELECT c.name
    FROM instructors i JOIN courses c
    ON i.course_id = c.course_id
    WHERE i.firstname = 'Mary' AND i.lastname = 'Williams';

    Hi Wes,
    There is no preference for configuring this that I know of, but Query Builder is fairly clever about detecting your flavor of SQL from the worksheet then sticking with it. If you design it graphically, the default flavor is ANSI, but QB seems to respect any worksheet edits that switch it to another flavor. I wouldn't vouch for that absolutely, but perhaps it's behavior you can take advantage of.
    Regards,
    Gary
    SQL Developer Team

  • Querying AD for users with SmartcardLogonRequired

    We are trying to write a script to query AD for all users who are required to logon with a smart card.
    The problem we're having is that it is only returning 43 users out of our ~750 that are using smart cards. In AD the checkbox is set and the users' logons are working properly
    Here is the command I ran first:
    Get-ADUser -Filter {SmartcardLogonRequired -eq $True} -Properties *
    When that didn't work I tried this, but got the same result:
    Get-ADUser -Filter {userAccountControl -band 262144} -Properties *
    Next I looked at individual users. My account is actually returned and when I check the property I get this:
    PS > $User = Get-ADUser -Filter {SamAccountName -eq '<REDACTED>'} -Properties *
    PS > $User.SmartcardLogonRequired
    True
    PS >
    When checking an account that isn't returned I get nothing back.
    PS > $User = Get-ADUser -Filter {SamAccountName -eq '<REDACTED>'} -Properties *
    PS > $User.SmartcardLogonRequired
    PS >
    I have tried un-checking and re-checking that box but that doesn't seem to have any effect. Has anyone come across this before? Any ideas on what to try next?

    To query users that are Smart Card Required, your first command was correct:
    Get-ADUser -filter {SmartCardLogonRequired -eq $True}
    Remember, smart card enabled and smart card required are two different things.  You can have a smartcard and still use username and password, (if the SCRIL box isn't checked).
    To set the account to enabled:
    Set-ADUser -Identity <name> -SmartCardLogonRequired $true
    To turn the requirement off:
    Set-ADUser -Identity <name> -SmartCardLogonRequired $false
    Remember that when you set the smart card requirement on an account, the NT Hash for the password is changed, meaning the user will no longer know their password.  If you set someone to true, then false, you have scrambled the password.
    Also, if you set the requirement to true while the user is logged on, you are changing the NT Password Hash in Active Directory and the user's session will have a bad hash.  Whenever that user tries to perform any NTLM function, they will become locked
    out.
    Good luck!
    - Chris Ream -
    **Remember, if you find a post that is helpful, or is the answer, please mark it appropriately.**

  • Bex query crash for user on sap portal

    hi gurus
    i have a bex query which users see it through sap portal, i have the case where a user X has made some drill down between rows and columns of the query (over portal), and since then every time this user X open the query, portal shows the query on the rows-columns format that the user X used once.
    What can i do in order user X see que query (on portal) in the default rows-columns??
    This problem just happen with user X, others users see the query in the default format with no problems.
    I ve tried deleting the portal personalization for user X on sap portal, but the problem persists...
    suggets?
    regards..
    joker

    If its Java only error then there wont be any dump in ST22.
    Strange issue for you, in general if we get 500 error, there should be details of it in the same page.
    You said this issue is occuring for only one user, is it getting replicated every time?
    You are also seeing the same error when u login as that particular user?
    Do one thing, assign him the Content Admin role and then do the preview of this iView form content admin and see if ur still seeing this error.
    Regards
    Yugandhar Reddy

  • Query Builder for Date

    If (LIKE @Name+ '%') is for searching names in Local Database then what is the Query if we want to find for date

    You could use BETWEEN:
    https://msdn.microsoft.com/en-us/library/ms187922.aspx?f=255&MSPPError=-2147217396
    SELECT * FROM Table WHERE [DateColumn] IS BETWEEN '2015-01-01' AND '2015-12-31'
    Or you could compare with different parts of a date, for example the month:
    SELECT * from Table1 WHERE MONTH(DateColumn) = 1 -- = January
    But please ask T-SQL related questions in the appropriate forum:
    https://social.msdn.microsoft.com/Forums/en-US/home?forum=transactsql
    Please also remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question.

  • Result Source Query Builder Filter for Content Sources

    I have several content sources that I want to add to a result source as a property filter. It works fine if I just have one but when I add multiple content sources it does not give me all the results. Is there a way to add more than one content source
    filter to one result source.

    Hi SpGurlz,
    How did you set the filter with content source in the query builder for the result source?
    I tested with more than one content source as filter in the query builder for the result source in my environment, and all the corresponding results were displayed fine.
    The query text for the result source was set like this: {searchTerms} contentsource:file1 contentsource:file2.
    Remember to add a space between the “{searchTerms}”, “contentsource:file1” and “contentsource:file2”.
    You can provide the query text of your result source here and I will help to check the logic.
    Best regards,
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Simple query builder

    Hi,
    I'm looking for simple query builder for free using, which is helper for any user, who no experiences with SQL (knows it a little). RDBMS is Oracle 8.0.6
    Regards
    Krzysztof Malinowski

    Hi,
    you may use the Oracle Query Builder for such purposes. The Query Builder is a component of the Oracle 6i Forms Developer Suite, which is downloadable here at OTN. The new Oracle 9i Developer Suite DOES NOT contain this product.
    Greetings
    Werner

  • "Search for User" display no user

    Hi,
    I'm testing the Early access release of the SVDI.
    I discovered a problem connecting to our OpenLDAP-Directory. The directory is configured with correct values for host, port, Base DN, User DN and password. The setup wizard finished without errors. But the search function on the "Users -> Users and Groups" tab returns no users.
    This might be an issue with the structure of our openldap-tree, so I digg a little deeper. :-)
    Our ldap tree looks like this:
    / ou=department,o=organization,c=de
    |--- ou=Users
    |--- ou=Groups
    |--- ou=Computers
    When I look at the logfiles of openldap, I recognize a ldap query with
    'filter=&(&(|(?objectClass=user)(objectClass=person)(objectClass=inetOrgPerson)(objectClass=organizationalPerson))(!(?objectClass=computer)))(|(cn=*demo*)(uid=*demo*)(mail=*demo*)))'
    This query doesn't return any entries.
    While playing around with ldapserach I removed the '(!(?objectClass=computer))' part and the query works.
    Removing this part from /etc/cacao/instances/default/modules/com.sun.vda.Service_Module.xml and restarting cacao makes me happy. :-)
    What are the requirements for a supported ldap structure? I know that only active directory and Sun directory server are supported, but changing the directory service is not a 'near-time' option for me.
    Currently we are using SUN VDI 2.0 and all (my) missing features are in 3.0. :-)
    Thanks,
    Thomas

    Hi Thomas,
    you did the right thing.
    OpenLDAP doesn't seem to support LDAP queries about object classes it doesn't know.
    This is impossible to have generic LDAP queries that are supported by every type of LDAP directory, and we know it is out of the question for customers to change their LDAP schema. That's why we made the LDAP filters and LDAP attributes, used by VDI, editable, so that customers can customize them to match their LDAP directory requirements.
    The default filters would work OK for quick demos with Active Directory and Sun DS, but for production deployment, it would still be recommended to adapt the filter to match most closely the schema of the directory and to put less strain on the LDAP directory. This will be documented with our official release.
    In Active Directory, computer objects have objectclass=user and objectclass=computer, so the (!(objectclass=computer)) part is there to avoid that computer objects are returned in a search for users and groups. But it is useless for the other type of directories that don't have such a specificity.
    FYI, here is how VDI performs the search for users and groups:
    The filter used by the web-GUI to search for users is: (&<ldap.user.object.filter><ldap.user.search.filter>)) and then the $SEARCH_STRING placeholder is replaced by \*criteria\* where criteria is the string you type in the web-GUI search field.
    Same applies for groups, using the group filters.
    We search first for users and then for groups.
    Regards,
    Katell

  • Query Builder in Web application

    Hi, I want to develop a web application, which include query builder for database using Jdeveloper nad ADF. In this application must be page with this queries and execute them. The problem is that i have no idea how to realize it, Please help me
    Manuals, links and other information would be good.

    <puts flame shields on>
    APEX has this out-of-the box, perhaps that would be a better tool for the job?
    <ducks>
    John

  • Tables not in Query Builder table list bug?

    In HTML DB version 1.6.0.00.87 we have tables defined in our schema in our workspace. When we create a view and click on the [Query Builder] link, no tables are in the drop down list for our schema. Why? The schema is there. I can go into the SQL Workshop and query the records our of the tables, but they are not listed in the [Query Builder].
    I tried this same function but with my workspace at htmldb.oracle.com. The tables in my schema are listed there.
    Is this a bug that was fixed in version 1.6.1.00.02?

    There is one schema assigned to the workspace. That schema is listed in the pop-up window. Here are the steps I am doing:
    1.) Click on SQL Workshop
    2.) Click on Create Object
    3.) Click on View
    4.) The correct schema is listed in the Schema field. There is only one schema in the drop-down list for the Schema field.
    5.) Click on [Query Builder]. A separate browser window appears with the correct schema. There is only one value in the drop-down list for the schema. "- Select Table -" is in the TABLE field.
    6.) I click on the TABLE field to get a list of tables for the schema. Only "- Select Table -" is listed. No other tables are listed.
    I can cancel the Create View and return to the main page of the SQL Workshop. I can click on Tables to see what table are available. I select the correct SCHEMA and see the list of tables.
    I tried this in the same version of HTML DB (v 1.6.0.00.87) in a different database ie. a different HTML DB repository and received the same results, missing tables in the pop-up page
    I do not know why the tables do not list in the [Query Builder] for the Create View.

  • CSV file for users who have one-time password email address

    Hi Guys,
    I am trying to extract the list of users who have one-time password email address in FIM or users who have registered with one-time password reset authentication workflow. I need to get their email addresses in CSV file.
    Regards
    Sarwar
    Sarwar

    Take a look at:
    http://social.technet.microsoft.com/wiki/contents/articles/3616.how-to-use-powershell-to-export-all-users-who-have-registered-for-self-service-password-reset-sspr.aspx
    The script queries a WorkFlow called "Password Reset AuthN Workflow" and returns its ObjectID, then uses it to do a new query searching for "Users" with these parameters:
    AuthN WorkFlow Registered = ObjectID of "Password Reset AuthN Workflow"
    The script exports these details to a CSV.
    Also, all OTP email addresses should be stored in the "msidmOneTimePasswordEmailAddress" attribute in the FIM Portal.

  • Re: Some Tables are missing: Query Builder

    Thank you!!! I had the same problem and this (table.xml) has helped, I can now see the tables in the left.
    I'm also not able to see any tables in the "Query Builder". I have tried to explore to see if the fix is similar with no luck. Does the Query Builder have a simlar fix?
    Thanks!!!
    Max

    Max,
    I branched this query to start a new thread. While the thread: Some Tables are missing did help you see your tables, much of the discussion happened last year and was not about the query builder.
    In the query builder for the current 1.1.2 build, you can only see tables you own. In the next update, you'll also be able to see tables you have select access to.
    Regards
    Sue

  • 2.1 EA1: Query Builder does not update View Results query

    When using the Query Builder, if you click onto the View Results tab to see the current query results, then go back to the "Select Columns" or "Create Where Clause" tabs to change the query, the "View Results" tab still shows the results of the original query even if none of the tables or columns from the original query exist. Clicking the Run Report button or setting a refresh interval has no effect.
    On a further note, the query builder still is not reentrant, in that you can't select (highlight a portion of or position the cursor within) a query and open the query builder for that query to graphically make modifications.

    Sentinel,
    The issue is known and is listed in the known issues in the release notes for the early adopter. We hope to have this addressed for production.
    The re-entrant query builder is still on our list of things to do. We plan to rewrite the Query Builder and address a number of the requests related to this feature. I'm hoping to make it a priority for the next release.
    Sue

  • After I edited the SQL in a dataset, I can't use the query builder in any datasets that I create.

    Is there a way to reset BI Publisher Enterprise 11 so that I can use the query builder again instead of having to write out all of the SQL? I know that I can't use the query builder for the dataset that I edited the sql in but I would like to use the query builder for new datasets.
    Thanks,

    Hi J_Constantine,
    Welcome to the Apple Support Communities!
    I understand that your iPad is restarting and not responding sporadically. You have already attempted some great troubleshooting steps and I think you are on the right track. Holding the home button is one step that you take while placing your device in recovery mode to restore. This is the method that I would suggest to restore. For complete information on how to place your device into recovery mode, please reference the attached article. 
    If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support
    Best regards,
    Joe

Maybe you are looking for

  • : Role Security within Company Code at Profit Center Level

    Can someone explain how to restrict GL transaction processing within a company code, below the company code level, at a Divsion / Branch level at the profit center level for ECC6 via user authorizations in FI GL roel security?

  • SAP user authentication in ABAP program

    We are  building a custom application in SAP. One of the functionality required is - Before printing a certificate ,we need to verify SAP user ID and password. Is there any FM in SAP which I can use or any other way by which I can ask user to enter h

  • System not booting,fa​ilure in bios startup too

    Hie , this is Abhishek from kolkata, my lenovo3000N100 laptop is not booting up. I am unable to to start the bios setup to choose booting device. i had played a game earlier before this problem occured.Now when I try to start it up it shows the intia

  • NIK SOFTWARE CRASHING PHOTOSHOP CC

    In the past couple of days, Photoshop CC just won't load if the NIk Software files are present in the plug in folder. I get a crash report and have sent that off, but is there a temp or perm fix for this that I've missed?

  • How do i enable my iphone when i forgot my passcode?

    I am locked out of my phone and cannot enable it because i forgot my passcode. is there a way to bypass this?