| Author | 
		  Message
		 | 
		
		  | amateur10 | 
		  
		    
			  
				 Posted: Mon Nov 28, 2005 10:38 pm    Post subject: API for filing up an attribute with some value | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 23 Nov 2005 Posts: 102
  
  | 
		  
		    
			  
				Can some one suggest me what api can be used to fill up an attribute with particular value say ' ' or 0.
 
 
thanks | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sdng | 
		  
		    
			  
				 Posted: Tue Nov 29, 2005 12:21 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 23 Nov 2005 Posts: 53
  
  | 
		  
		    
			  
				it's not enough inf..
 
you can use method set with '' or 0 or null | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | amateur10 | 
		  
		    
			  
				 Posted: Tue Nov 29, 2005 5:52 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 23 Nov 2005 Posts: 102
  
  | 
		  
		    
			  
				I have been asked not to use SETVALUE but use dpt api to fill the attribute with '0' or spaces.  
 
 
Could you please suggest 
 
 
I looked at all api there are only fill right or fill left.  no such an api to fill with some value. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Tue Nov 29, 2005 6:01 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				Maybe you should ask whoever told you not to use SETVALUE what you should do instead. _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sdng | 
		  
		    
			  
				 Posted: Tue Nov 29, 2005 6:16 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 23 Nov 2005 Posts: 53
  
  | 
		  
		    
			  
				Do you say about:
 
DtpUtils class
 
public static String padLeft(String src, char padWith, int totalLen)
 
public static String padRight(String src, char padWith, int totalLen)
 
? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | amateur10 | 
		  
		    
			  
				 Posted: Tue Nov 29, 2005 6:34 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 23 Nov 2005 Posts: 102
  
  | 
		  
		    
			  
				it seems very simple. but I have never done it. So, lets say i have to fill up a attribiute of a bo. how I can mention that. I know programmably but trying to use  the API 
 
 
bo.attribute.ladLeft(xxx,xxx,xxx) 
 
 
is it something like this? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sdng | 
		  
		    
			  
				 Posted: Tue Nov 29, 2005 6:55 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 23 Nov 2005 Posts: 53
  
  | 
		  
		    
			  
				| bo.set(<AttributeName>,DtpUtils.padLeft(bo.getString(<AttributeName>),<padWith>,<totalLen>); | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Ratan | 
		  
		    
			  
				 Posted: Tue Nov 29, 2005 10:14 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand Master
 
 Joined: 18 Jul 2002 Posts: 1245
  
  | 
		  
		    
			  
				API to set a value for a bo attribute is 
 
 
<BO>.set("<attribute>", "<Value>);
 
 
Go thorugh the API documentation. _________________ -Ratan | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | amateur10 | 
		  
		    
			  
				 Posted: Tue Nov 29, 2005 10:19 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 23 Nov 2005 Posts: 102
  
  | 
		  
		    
			  
				thanks guys
 
i solved my problem | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |