on 02-11-2016 11:37 AM
Dear Experts,
I would like to explain my requirement with an example as below:
When the application is loaded, DROPDOWN_1 should display a value from DS_1 which is dynamic. Based on some calculations, default value is selected as below:
Now when we drill down the drodown, it should show the values from a static list like below:
This is confirmed that DS_1 will populate a value which will definitely be present in static list.
Now I am able to populate default value from DS_1; but in doing so, I am getting all the values in DROPDOWN_1 from DS_1 only. I am not able to get the further drilldown values from static list.
I could not find any help regarding this on SCN. Kindly help.
Thanks and Regards,
Nitesh Kumar
Hello all,
I am trying to make it more clear once more:
Static list - 2010,2011,2012,.......,2020.
DS_1 ----> It could have any one value which are present in static list.
Suppose DS_1 gives us value 2012.
Now when application is loaded, DROPDOWN should show the value 2012 by default.
When we drill down the dropdown button, it should diplay the years 2010,2011,2012,....,2020.
Thanks and Regards,
Nitesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nitesh,
Hard code the codes in your drop down. And then use DS_1.getMemberList("_VsqCcbnwEeWrRM44nAR2dw", MemberPresentation.TEXT, MemberDisplay.TEXT, 1); to get the value and then assign it as selected value to the dropdown.
PS: If you know always is gonna be one value you can leave 1 as it is else you need to change the number but this becomes irrelevant for your case as it will have massive changes.
Ex:
On Startup:
var year =Convert.subString(APPLICATION.getInfo().dateNowInternalFormat,0,4);
DROPDOWN_1.setSelectedValue(year);
INPUTFIELD_1.setValue(year);
Inputfield On Change:
DROPDOWN_1.setSelectedValue(INPUTFIELD_1.getValue());
DropDown Items:
Result on RUNTIME :
Regards,
Bogdan
hi Nitesh,
From what i understand from your query.
I hope this is what you expect?
Sivakami
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Nitesh,
Then i see that your issue can be solved like this
create DD with static list - both key and text as - year number
Then after deriving your default value from the mentioned calculation in your post
say str_default will have default value in string format
Now you can use
DD.setSelectedValue(str_default);
DD.onSelect(); // to perform filtering of datasources based on default
thanks,
Sivakami
Hi Nitesh,
from your statement
////This is confirmed that DS_1 will populate a value which will definitely be present in static list.
I am assuming that your static list is just a subset of the list of years that DS_1 has, and instead of displaying the whole list from DS_1 you want to restrict the dropdown to just show the list of values from the static list.
to do this, you can restrict the DS_1 with your static list.
for ex: DS_1 has a dimension "0YEAR" which has list of values like [2000, 2001, 2002..2030]
and your static list has values [2005, 2006..2015] and instead of displaying all the 30 values in the drop down box you have to display the 10 values from the static list.
apply a filter on the DS1
DS1.setFilterExt("0YEAR",["2005,"2006",.."2015"]);
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Naveen,
No, actually things are reversed. Scenarion is like below:
Static list - 2010,2011,2012,.......,2020.
DS_1 ----> It could have any one value which are present in static list.
Suppose DS_1 gives us value 2012.
Then when application is loaded, DROPDOWN should show the value 2012 by default.
When we drill down the dropdown button, it should diplay the years 2010,2011,2012,....,2020.
Thanks and Regards,
Nitesh
Hello Nitesh,
let me try to paraphrase your requirement:
- you have a listbox where you would like to populate a list of years. it does sound you would like to use a static list.
- you also retrieve a value from BW and you would like to use that value as the "default" / selected value.
correct ?
thanks
Ingo Hilgefort, Visual BI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can also use the Collection component:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nitseh,
I think I am missing something ...
Nitesh Kumar wrote:
Now I am able to populate default value from DS_1; but in doing so, I am getting all the values in DROPDOWN_1 from DS_1 only. I am not able to get the further drilldown values from static list.
Could you please explain a bit further your issue ?
So, your DD is not binded right ? The static list you are refering is a range of year, like 2010 to 2030 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Franck,
Thank you for your reply.
DD is actually bound with static value. I am populating default value writing code at On Startup event.
Further I don't know how to get list values which are from static list.
Yes, it is a range from 2010 to 2020. Binding DD is not required. Any option which give me range like above will be fine.
Thanks and Regards,
Nitesh
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.