cancel
Showing results for 
Search instead for 
Did you mean: 

Input "(ALL_MEMBERS)" has an invalid format

Former Member
0 Kudos

Hello Fellow Coders,

I am using BOBJ Design Studio version 1.3 and am facing a very weird error when executing my application.  I have three cascading drop down filters in my application for STATE, CITY and LOCATION.  Based on my state selection, only relevant Cities belonging to that state is populated in the drop down.  Same is the case with LOCATION drop down which gets populated based on CITY selection.

The issue that I am facing is when I don't select anything for CITY, system sends ALL_MEMBERS as the filter criteria.  Eventhough my end result is correct, I get this error message Input "(ALL_MEMBERS)" for Ship To City Code has an invalid format.  In my code, I am sending blank for the filter values but it is still giving issue.  Has anyone ever came across this issue and would like to share it with me?  I do really appreciate y'all's input. 

Please see the attached screenshot

Accepted Solutions (0)

Answers (3)

Answers (3)

vijaymuniraj
Active Participant
0 Kudos

Raj,

Is "All member" or "All" defined at database level or in front end? If it is at database level,  you hardcode the values for state, city and location (refer screen shot) and pass the key value where ever it is required. i.e.

DS_1.setfilter("State", Dropdown1.getselectedvalue());

DS_1.setfilter( "City", Dropdown2.getselectedvalue());

DS_1.setfilter( "Location", Dropdown3.getselectedvalue());

So, when ever you select "All city" it will automatically pass blank value and fetch the list of location values to dropdown3 (you can ignore "All location" if it comes from database and hardcord it like in above pic)

This is how my dashboard works

Former Member
0 Kudos

Hi Raj,

You do not have to write the if condition at all,

As you are mentioning All in the script to load the combo box, the value for that All will be blank.

So technically you do not need that if loop statement.

Can you try it without the Loop and see if it is working?

Regards,
Fazith Ali Z.

Former Member
0 Kudos

Hi Fazith,

Thank you for your response and sorry for my delayed response.  You are right that there is no need to put If statement which i realized after posting this question on the forum.  So i took the statement out but i was till getting the same error.

Since my output was coming out correctly, I just selected the setting under Properties tab-->Display --> Displayed Message Types --> None. I know this is a work around but considering that I was running against time, i just did that and things are working fine now.

Changing this setting does not solves issue of error message prompt, it only hides it from display.

Former Member
0 Kudos

Hi Raj,

Can you check this post and see if it would solve this for you? Or if it already did, since it passed so long time. And if so, please mark this question as answered.

Re: Input "(ALL_MEMBERS)" has an invalid format

   Bogdan Popescu

 

Hi Lex,

I can agree that the SetVariableValue function is the one that was causing the above errors. But another "workaround" would be to send the data in the right format through the function.

In order to find out what is the right format I would suggest, you send a value to the variable (prompt) via the Prompt Dialog. And then use a script to retrieve the value to a text (retrieving the value of the promp will be made upon datasources ex: DS_1.getVariableValue). Then you know what is the format so you can code it in the script where you put setVariableValue function.

Regards,

Bogdan

Regards,

Bogdan

Karol-K
Advisor
Advisor
0 Kudos

can you share the code which is sending it? I think you need to place an if condition there if the selected key is ALL_MEMBEERS, then the selection is empty.

like this:


var selectionKey = DROPDOWN_1.getSelectedValue();

var realSelection = selectionKey;

if(selectionKey == "ALL_MEMBERS") {

  realSelection = "";

}

DS_1.setFilter...(<DIM>, realSelection");

check up if this helps

Former Member
0 Kudos

hi Karol,

Thank you for your response.  What you are suggesting is exactly what I am currently doing in my code.  I am sending the blank values thinking the DB will automatically consider all the values...but this is not the solution.

Karol-K
Advisor
Advisor
0 Kudos

acrually, to show members you should call a method clearFilter().

DS_1.clearFilter(dimension)

and, if you get the message like in your screenshots, you pass somewhere the "ALL_MEMBERS" string, where is it. please paste here the complete event script.

Former Member
0 Kudos

Hi Karol,

Here is the entire script

Former Member
0 Kudos

Hi Raj,
Showing your original script will help us to get clarified with this issue ,

to be generic When you select your STATE dropdown, the corresponding cities gets populated
in the  CITY dropdown, when you select CITY, the corresponding LOCATION.
The problem arises when you skip the CITY dropdown selection , but you have populated the location with the city selection .
One thing which may help is call CITY dropdown Onselect event at the event of STATE dropdown selection so that it selects the default value.
If you have already done all this, Kindly ignore and try to post the exact script which you have used.

Thanks

karthik Swaminathan

Former Member
0 Kudos

Hi Kartik,

Yes all that is already in place.  If a user does not select the CITY, then LOCATION dropdown will not even get populated.  The script before that is all business logic calculation and has nothing to do with interaction with filters or GUI.

Karol-K
Advisor
Advisor
0 Kudos

please check your key in drop down for all members, are you setting it like this:

DROPDOWN_1.setItems(DS_1.getMemberList("0BC_PERS1", MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 100, "ALL"));

?

and in the script, you just need:

var dropValue = DROPDOWN_1.getSelectedValue();

if(dropValue == "ALL") {

  DS_1.clearFilter("0BC_PERS1");

} else {

  DS_1.setFilter("0BC_PERS1", dropValue);

}

Former Member
0 Kudos

Hi  Karol,

I just made the by removing setfilterExt with clearFilter as you suggested but it is still giving me the same issue.  As far as rest of the script is concenred, it is exactly the same as yours.

Karol-K
Advisor
Advisor
0 Kudos

can you please attach the complete application to this thread?

I try to get internally same query structure and check this issue

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Karol,

Unfortunately I will not be able to do that due to company policy but if you can send me a direct email, I can provide you the info.  You can get my email from my profile.

former_member283968
Discoverer
0 Kudos

Hi all,

This message is invoked by the APPLICATION.SetVariableExt() method, not the setfilter methods.

I am using the SetVariableExt() method in order to have a kind of cascading dropdown with 4 dimensions, where every dimension influences the other 3.

Selecting the ALL_MEMBERS value invokes this message. I use this syntax:

APPLICATION.SetVariableExt(<Parameter>, "")

I have not found any other solution then the workaround mentioned in this thread (setting the messages level to none).

Regards,

Lex.

Former Member
0 Kudos

Hi Lex,

I can agree that the SetVariableValue function is the one that was causing the above errors. But another "workaround" would be to send the data in the right format through the function.

In order to find out what is the right format I would suggest, you send a value to the variable (prompt) via the Prompt Dialog. And then use a script to retrieve the value to a text (retrieving the value of the promp will be made upon datasources ex: DS_1.getVariableValue). Then you know what is the format so you can code it in the script where you put setVariableValue function.

Regards,

Bogdan

former_member283968
Discoverer
0 Kudos

Hi Bogdan,

Thanks for your reply. You put me on the right track. This is what I found.

After selecting the "All Products" value in the dropdown list .getSelectedValue() results in "(ALL_MEMBERS)".

I was using the following script, which invoked the error message:

var sProduct = DROPDOWN_PRODUCT.getSelectedValue();

if (sProduct == "ALL Products" )

{

     sProduct = ""

}

APPLICATION.setVariableValueExt("psProduct", sProduct);

The All Members Text is NOT what is returned after selecting it from the Dropdown List.

So then I tried (and it still didn't work):

var sProduct = DROPDOWN_PRODUCT.getSelectedValue();

if (sProduct == "(ALL_MEMBERS)")

{

     sProduct = ""

}

APPLICATION.setVariableValueExt("psProduct", sProduct);

Now I use this script, which works fine.

var sProduct = DROPDOWN_PRODUCT.getSelectedValue();

if (sProduct == "(ALL_MEMBERS)" )

{

    APPLICATION.setVariableValueExt("psProduct", "");

}

else

{

    APPLICATION.setVariableValueExt("psProduct", sProduct);

}

Former Member
0 Kudos

Hi Lex,

I'm glad that helped you. I hope it will help Raj as well so this question can be marked as answered

Regards,

Bogdan