Need Javascript to pop up message after validating two given dates — Oracle Analytics

Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Need Javascript to pop up message after validating two given dates

Received Response
1
Views
3
Comments
yaseennawaz
yaseennawaz Rank 4 - Community Specialist

Hi,

Need to write a Javascript to pop up date validation for two date columns.For example date1 and date2.The dates should fall within 370 days if it is +or - 370 days then a pop up should go saying outside of permissible range.Can you please help me with such a javascript as I don't know javascript and not sure where to write it to get this kind of a functionality.

Regards,

Yaseen

Answers

  • Thomas Dodds
    Thomas Dodds Rank 8 - Analytics Strategist

    I would suggest you not try to customize the UI with code ... rather, you can let the user pick their dates and you can have a small analysis showing the days between the dates picked ... conditional format it (red/green) or show a message.  No need for custom code.

  • Manoj Dixit
    Manoj Dixit Rank 6 - Analytics Lead

    Or display the required section on the page conditionally. So instead of using a javascript, use a condition (an Analysis that will validate the date ranges) and if the second date entered is within the range, display the target Anaysis results.

    Also, add a text box to guide the user to enter the second date within the range.

    Regards.

  • Making it short: if you go in the way of a piece of javascript be ready to spend few weeks on it and end up with something not working.

    The prompt in OBIEE aren't just simple input HTML object, there is a ton of JS all around, many event handlers etc.

    @Thomas Dodds gave you the best idea and @Manoj Dixit extended the same idea by using out of the box available functionalities of OBIEE: show sections conditionally.