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     [CASE OPENED] Validation for Submit button to check for filter selection - How to?:

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CASE OPENED] Validation for Submit button to check for filter selection - How to?:
 Login/Join
 
Virtuoso
posted
Hey all,

I have an HTML form that has the submit button of course, but I need help knowing what little bit of Js code I would need to check to see if the user selected something from a set of comboboxes before submission. Has anyone here done this before and willing to share your code snippet with me.

Thanks in advance!

This message has been edited. Last edited by: CoolGuy,


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Master
posted Hide Post
WF does basic value validation. It mainly just looks that a value was inputted. Anything beyond that you have to right your own JS function. There isn't anything "Standard" that I would be able to share. You will basically have to build your own. I would start by understanding the document.getElementById() function ( http://www.w3schools.com/jsref...c_getelementbyid.asp ) and go from there. You might want to look into getting some training in the basics of JS if you've never written in JS before. Or as always google is your friend and w3schools.com has a lot of good tutorials for understanding JS. There are a lot of message boards out there that deal specifically with JS. Those will probably be able to help you more then focal point depending on how complex you are looking to get. Where as many of us do know JS, remember that most people here probably learned WF first and JS second...


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Virtuoso
posted Hide Post
Eric,

Thanks for you attempt to help me. I actually already knew all that for the most part. If WF does basic validation for components, how is that done? I've seen the option within the component properties of like an input text box, but for a submit button, the only way to validate that I could see was to create an onclick event handler. I've had mixed results with that, so I was wondering if someone here that has done this a bunch could just give me a quick snippet that has worked for them. Thanks though.


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Master
posted Hide Post
CoolGuy,

WF's basic validation relies on the "required" attribute under the properties of an input. If an input is required, WF will prevent you from running the report if its empty and will highlight it with a red outline. Thats all that WF does. As much as I've tried to get IBI to tell me what function controls this, they won't provide that information. So you can't edit the function or call it on your own outside of the onExecute() call.

What is the most common thing for people to do when writing their own validation is to replace the OnSubmit function of the submit button with whatever function you are running for validation. Just remember to include the OnExecute() call that is already included in the onSubmit button.

If you have already tried something and its not working as it is expected. Maybe you would be better served to provide your code and the issues you are experiencing. It's very difficult to offer guidance on such a vague question.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Virtuoso
posted Hide Post
Eric.Woerle,

Thanks for your insights on the required attribute that WF uses. I haven't went back to touch this issue for a bit due to having to move on to other things for the time being. I've opened a case a while ago in regards to the Selection & Validation property that allows WF to validate an input field on your form. In AppStudio 8.1.04 at least, it malfunctions. I set it to required/validate or another option/value, but it never saves it after I select it. Haven't heard back from IBI yet. Again, thanks for your time and help.


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report 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     [CASE OPENED] Validation for Submit button to check for filter selection - How to?:

Copyright © 1996-2020 Information Builders