Skip to Content
author's profile photo Former Member
Former Member

using radio button date fields range

hi Experts,

i used 2 datefileds for date to date comparison and 2 datefileds for week to date comparison ,but when i used 2nd datefilds its not cleared old values...main source is BEx query variables for DTD and WTD

my code ,im using like this..

if(RADIOBUTTONGROUP_1.getSelectedValue() =='Date To Date')

{

//DS_1.clearAllFilters();

DATEFIELD_CURRENT_FROM.setVisible(true);

DATEFIELD_CURRENT_TO.setVisible(true);

DATEFIELD_CURRENT_FROM_D.setVisible(false);

DATEFIELD_CURRENT_TO_D.setVisible(false);

}

else

{

//DS_1.clearAllFilters();

DATEFIELD_CURRENT_FROM_D.setVisible(true);

DATEFIELD_CURRENT_TO_D.setVisible(true);

DATEFIELD_CURRENT_FROM.setVisible(false);

DATEFIELD_CURRENT_TO.setVisible(false);

}

refresh button

var varDate = DATEFIELD_CURRENT_FROM.getDate() + " - " + DATEFIELD_CURRENT_TO.getDate();

var varDate1 = DATEFIELD_CURRENT_FROM_D.getDate() + " - " + DATEFIELD_CURRENT_TO_D.getDate();

APPLICATION.setVariableValueExt("ZWDAT_UNI_DTD", varDate);

APPLICATION.setVariableValue("ZWDAT_UNI", varDate1);

thanks in advance...

Ashwin

p1.png (7.0 kB)
p2.png (7.1 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Sep 25, 2014 at 03:35 PM

    Hi,

    your issue is in the date format. you are using function

    setVariableValueExt()...

    and this is expecting "external format", which is locale-dependent.

    you are using at the same time getDate, which is returning internal format, as written in documentation.

    getDate()

    Returns the selected date.

    Parameters

    None

    Returned Value

    String. It contains the date in the format "yyyymmdd".

    so, you need

    * either convert always to external format and use the "ext" funtion - which is required if you want to use ranges

    * or use getDate() and pass into the "setVariableValue()" funtion, but this is probably not working for ranges.

    please try it out.

    Karol

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.