Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 jduluc12
		
			jduluc12
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		HI,
I want to write an expression to include amount only for those customer whose name starts with "ABC" but does not have address which starts with "XYZ"
sum({<Customer=p{1<Name={'ABC*'}, Address={'*'} - {'XYZ'}>Customer}>}Amount)
it is not working and it behaves exactly like as if the statetment is
sum({<Customer=p{<Name={'ABC*'}>Customer}>}Amount)
what am i doing wrong?
Thanks
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be this
Sum({<Customer = p({1<Name={'ABC*'}, Address=-{'XYZ*'}>} Customer) >}Amount)
 jduluc12
		
			jduluc12
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		nope...it is not working
i tried that
 hari8088
		
			hari8088
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be like this..
sum({<Customer=p{1<Name={'ABC*'}, Address-={'XYZ*'}>Customer}>}Amount)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Have you made sure that p is followed by '(' and ends with ')'... you don't have () and there were other issues....
 jduluc12
		
			jduluc12
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This the exact statement that i have written.
and p is followed by ( and ends with )
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Do you see an error or 0?
 jduluc12
		
			jduluc12
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		here is the whole expression
sum({<Month=, Year=,Number=,[Type={‘Regular’}, Account={‘def’}>
* 1<Memo=p({<Memo=,Name={‘ABC*’}, [Address]=-{‘XYZ’}>}Number)>}Amount)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Address starts with XYZ or is XYZ? You don't have an asterisk for Address?
sum({<Month=, Year=,Number=,[Type={‘Regular’}, Account={‘def’}>
* 1<Memo=p({<Memo=,Name={‘ABC*’}, [Address]=-{‘XYZ*’}>}Number)>}Amount)
 jduluc12
		
			jduluc12
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		the strange part is
if i remove - from [Address]=-{‘XYZ’} then it works perfectly according to the expression i.e. it brings only those names who’s address starts with XYZ
sum({<Month=, Year=,Number=,[Type={‘Regular’}, Account={‘def’}>
* 1<Memo=p({<Memo=,Name={‘ABC*’}, [Address]={‘XYZ’}>}Number)>}Amount)
