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.
Iam using webfocus 8005 version and am stuck with this Javscript validation.Could anyone out there please help me to do this validation in javascript from the launchpage and this is really really very urgent for me. 1)I have a text box wherein the user can enter multiple employee ID's but cannot enter a manager ID and an employee ID at the same time and if they enter a manager ID and an employee ID at the same time,it should alert them with a message or throw an error.There is a table which fetches the manager and the employee relationship and from that table,we can determine which employee is reporting to which manager and there are over 2Lakh employee id's.As there are >2lakhs of employee and manager ID's ,I can't check for these 2 combinations within the Javascript function using the if else statements or anything else.Any ideas on how to accomplish this is highly appreciated.
2.I have a text box1 wherein multiple ID's can be entered.Also I have a drop down having the values such as Jan 10,Feb 10,Mar 10 to till date and these values are dynamically being populated from a table. Finally, I have another textbox2 wherein I need to copy the 1st entered above textbox 1's value and the 1st entered above dropdown's value (say in the textbox1,the 1st entered ID is XYZZ and in the dropdown, if Feb 10 is being selected ;then in this textbox2 I need to get as XYZZ0210 but I should also allow the users to edit this textbox at a later stage to enter any values of their choice.)
Could anyone please help me as soon as possible for the above 2 requirements.This is really very urgent. Thanks a lot in advance!This message has been edited. Last edited by: info4pal,
How about just using chaining? So if a person picks a certain manager only the relevant employees are available - or vice-versa. A variation on this would probably work with your second requirement also.
Thanks George for the quick response and sorry for the delayed response from my end.
Actually Iam not sure whether chaining would help me in both my requirements but Iam trying a different approach for the 2nd requirement(i.e.,I have used the switch statements but unfortunately that is also not working as expected and I will try posting my tried coding soon.)
I can't post any code, but chaining is easy enough to implement with the GUI.
If you can generate a list of managers from your data you can easily create a drop down list. Similarly, you can create a drop down list of the employees. With the chain feature you can select all - and only - the employees that report to a given manager, or vice versa if you wish to work it that way.
In my situation, we (for example) choose a certain country, and only the customers for that country are displayed. From there it's a simple matter to run reports for one, several, or all customers in that country.
You suggest that you want to use a text box to select the employees and or managers, but why would you want to do that if you can generate a list from the data? There is no way to make chaining work with a text box as far as I know.
You can do chaining with a text box (edit box). I created an example that allows entry of numbers in an edit box and uses chaining to pass the values to a WebFOCUS procedure that validates against GGSALES.SEQ_NO. Result, valid or invalid, is displayed in the next edit box.
Thanks for the quick reponses TexasStingray and dbeagan... But I think Iam trying to check one condition and not to do chaining as the requirement as changed for the 1st question and I will try posting the same soon.
However I have got a solution for the 2nd question which I had asked for...
Aanyways thanks a lot for all your time and support on this.
This is my reqquirement...In the front end,there is a textbox wherein multiple ID's can be entered separated by a commas and the user can enter only an employee id and an employee id / a manager id and a manager id at the same time(That means the user cannot enter Emp id and manager id at the same time(say abcd is an emp id and xyz1 is a mgr)and if they enter the same,it should throw an error message.
Now I have a query which looks something like this: select count(distinct(B)) from(select distinct B,C from table1 where A in ('ABCD','XYZ1') and (B is not null);
Now in the textbox,once the id's are entered in the textbox, it should go hit this query which is present in the fex file and if the count is greater than 1,then only it needs to throw an error.....
Could anyone please let me know how to do this...Any help is highly appreciated!
When you click the link for the fex file, do you see the message, "Apologies. There is no preview available ... Download"? If not then what do you see?
I and others suggested chaining, seems like a good fit, hopefully you can see that once you are able to run the example. I understand that you do not want to do chaining in the typical sense of displaying a list of values in the second control. But if the second control shows the valid/invalid message and you style it not to look like an edit box control, then it seems like you should be good to go.
WebFOCUS 8.2.06
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010
I was able to download the file but unfortunately this iswhat Iam trying to do in my code :
This is my reqquirement...In the front end,there is a textbox wherein multiple ID's can be entered separated by a commas and the user can enter only an employee id and an employee id / a manager id and a manager id at the same time(That means the user cannot enter Emp id and manager id at the same time(say abcd is an emp id and xyz1 is a mgr)and if they enter the same,it should throw an error message.
Now I have a query which looks something like this: select count(distinct(B)) from(select distinct B,C from table1 where A in ('ABCD','XYZ1') and (B is not null);
Now in the textbox,once the id's are entered in the textbox, it should go hit this query which is present in the fex file and if the count is greater than 1,then only it needs to throw an error.....
Could anyone please help me on this as this is really urgent!
As has been suggested a couple of times already, perhaps your entire approach to this project is not optimal (I'm trying to be diplomatic here). Personally I can't understand why on earth you would want to to input IDs in a text box separated by commas. The possibilities for operator error are enormous.
Why not use a multi-select control, or in fact two controls - one for the employees and one for the managers, which would make your complicated rules for separation of employees and managers entirely unnecessary.
Ok, it took me several time reading what your requirement is. you have emmployees (1123, 1456, 1789) and managers (2123, 2456, 2789) some can type as many employee id as they want in to a text box or and many managers as the want into the same test box but they cannot mix them. each one seperated by a comma. Im not going to go into the security ramifications as that your call. but at the top of the fex that display the report include the code that check to validate the id enter are either all manages or employees but not both. If they are both have the fex display a message if they are just managers or just employees then run the report. There are other ways to do this like i said using AJAX is what I would do.
Thanks for your response. George - I also tried suggesting having 2 dropdowns - one for mgr and another for an emp but the business needs it in the form of textbox itself.. TexasStingray - Could you have some sample code in Ajax which I could use for this validation.
Sometime challenging the business needs may makes the things involving and better...
With dropdown, you can display id + name but pass only id to your fex. So users don't have to know who has which id, they can choose a name instead. It also make your job easier and gives you bonus point to have been creative
Think about it
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
Thanks for the response. Yes I do agree with you but the business wants to have the textbox and enter the ID's separated by commas in place of a dropdown.
Any ideas/help on how to do this using a textbox with the ID's entered would be highly appreciated.
Putting it mildly, your "business" people are nuts.
With a list box, for example, there is nothing stopping a person from typing the employee ID, and if they type an incorrect one it won't show in the list. Validation is done right there, before they hit the submit button. If there are many employees then scrolling does become an issue, but simply tying the first few letters or numbers will bring the relevant section - or the exact match - into view. If it's a range of values you want, from employee AAAAA to AAABB, then just make two list boxes and choose the start value from the first box and the end value from the other one.
Finally, if you are dealing with thousands of employees, then just make a static list box that chains to another. In the Static one you have choices such as employees A to M, N to S, T to Z - or any breakdown that works for you.
Maybe if you could explain to me WHY your company insists on the comma-delimited list of employee IDs I could be more sympathetic, but as I see it now it is just the WRONG approach.This message has been edited. Last edited by: George Patton,
info4pal, you have been asking for this solution almost for 2 weeks. Noone will solve this for free. You have been given enough examples to solve this on your own.
Release: WebFOCUS 8104, AppStudio: 8105 OS: Windows Output: HTML,Excel,Active Reports