on 08-17-2007 12:56 PM
Hi Experts,
My code is as follows:
IPrivateTimesheetView.ICategoriesElement categoryElement;
String wbs ="h";
double d =0;
String Day1 ="";
for (int i=0 ; i<wdContext.nodeWorklist().size() ; i++){
wdContext.nodeWorklist().setLeadSelection(i);
categoryElement = wdContext.createCategoriesElement();
wbs = wdContext.currentWorklistElement().getReciever_Wbs_Element();
Day1 = wdContext.currentWorklistElement().getDay1();
if(""!=Day1 && null!=Day1)
d = Double.parseDouble(Day1) ;
categoryElement.setCategoryText(wbs);
categoryElement.setSeries1Value(d);
categoryElement.setSeries2Value(2);
wdContext.nodeCategories().addElement(categoryElement);
wbs = "";
Due to some issue with "Day1 = wdContext.currentWorklistElement().getDay1();" line, I am getting following error:
" java.lang.NumberFormatException: empty String "
Could you please let me know how to sort out the issue?
Regards,
S
Hi Stuart,
I have answered for your previous query.
Regards
Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stuart,
Try the following,
String Day1 ="";
if(wdContext.currentWorklistElement().getDay1() != null){
Day1 = wdContext.currentWorklistElement().getDay1().trim();
}
if(""!=Day1)
d = Double.parseDouble(Day1) ;
categoryElement.setCategoryText(wbs);
categoryElement.setSeries1Value(d);
categoryElement.setSeries2Value(2);
wdContext.nodeCategories().addElement(categoryElement);
wbs = "";
Hope the trim() method helps.
Regards,
Rekha Malavathu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.