Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 sibideepak
		
			sibideepak
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi all ,
I have an if statement which i want to return returns '{"=$(vMargin2)>.30"}' but it returns nothing .. condition works fine but
still can return other string not this .. I could able to sort out issue .. what can be the problem or any syntax mistakes ??
where vMargin2 = {"=((Sum({<DocDate={'$(vTempID)'}>}LineTotal)-sum({<DocDate={'$(vTempID)'}>}LineNLC))
/Sum({<DocDate={'$(vTempID)'}>}LineTotal))$(vMarginSelect)"}
Thanks in Advance .,
 
					
				
		
 awhitfield
		
			awhitfield
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		What's the if statement?
 
					
				
		
 sibideepak
		
			sibideepak
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
=If(GetFieldSelections(Margin%,'','','GroupA')='>30%','{"=$(vMargin2)>.30"}')
 
					
				
		
 stigchel
		
			stigchel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Well there are a lot of options here, but if I'm guessing....
=if(Only({GroupA} Margin%) ='>30%','{"=$(vMargin2)>.30"}')
- Use Only because you are expecting only one value anyway
- Assuming GroupA is an alternate state (GetFieldSelections has only two arguments)
- Assuming there is one selected value in Margin% in the GroupA state
 
					
				
		
GetFieldSelections does actually have 4 possible arguments, including the Field. The last one is the state..
 
					
				
		
 sibideepak
		
			sibideepak
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Kim Rørmark,
Getfieldselection isn't a problem here.
 
					
				
		
I know, I just wanted to point out that GetFieldSelection actually accepts a state argument.
How does your data look. Could you create some example-tables?
 
					
				
		
 stigchel
		
			stigchel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Ah, sorry.. this was added after the SR3 version I'm using
 
					
				
		
 sibideepak
		
			sibideepak
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It's added in SR8 I think .,
