Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]How to call a query present in a fex from html/javascript...

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]How to call a query present in a fex from html/javascript...
 Login/Join
 
Guru
posted
Hi,

I have a textbox wherein multiple Id's of 4 digits can be entered separated by commas and I can enter emp id and emp id or mgr id and mgr id at any point in time and should throw an error if I enter an emp id and a mgr id at the same time.
Iam using this query below and if the count is greater than 1, then I need to show an alert message saying that it is an invalid entry.

ENGINE oracle SET DEFAULT_CONNECTION instance1
SQL SQLORA PREPARE SQLOUT FOR
select COUNT(distinct(title)) from (select distinct title,type from table1
where id in ('ABCD','BCD1','CDE1')and title is not null );
END

Could anyone please let me know how can I connect the html/javascript to hit this query and throw an alert message as soon as they enter the emp id and the mgr id's.

This is really urgent and please help me on this.

Regards!

This message has been edited. Last edited by: info4pal,
 
Posts: 270 | Registered: October 30, 2014Report This Post
Guru
posted Hide Post
I would recommend coming up with a different design. I would advise against implementing a SQL request inside of javascript as that is not secure and anyone could read that and get connection information.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Guru
posted Hide Post
Hi,


Thanks for the quick response MattC.
Actually Iam not trying to implement the sql query inside the javascript but am having the sql query inside the fex file and if the count is greater than 1,then I need to throw an alert message saying that it is invalid.

I need some help on how do i connect the textbox in javascript to hit this query and once if the count is greater than 1 ,then it should again go back to the html page and pop up an alert message window.

Please help me on this.

Thanks!
 
Posts: 270 | Registered: October 30, 2014Report This Post
Virtuoso
posted Hide Post
You may need to look into JavaScript's AJAX to implement an asynchronous call to the .fex that performs the validation, and once the request is done you'll use JavaScript to parse the XML result of your query. Just make sure your .fex returns results in XML (check documentation for ON TABLE PCHOLD FORMAT XML).

On a different note, I've noticed that many of your recent requests are of a "Very urgent" nature. Focal Pointers are very helpful, open to share their experience and regularly go to great extents to illustrate approaches and techniques (I've learnt lots from them) but as with many other forums' supporters, are not in the business of solving someone else's "Very urgent" needs as they have their own to deal with. I would advise you to get in touch with IBI Tech Support in order to get the kind of priority help you need in situations like these.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Take a look at the technique Rifaz recently shared here: [SHARING] Those who interested AJAX and WebFOCUS.

It may give you some very good hints at solving your need.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Guru
posted Hide Post
Hi,

Thanks a lot njsden for the inputs.
Sure I will try reaching to IBI tech support for any urgent issues moving forward.

Regards!
 
Posts: 270 | Registered: October 30, 2014Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]How to call a query present in a fex from html/javascript...

Copyright © 1996-2020 Information Builders