Jump to content

Portal filter with Let function


rivet

This topic is 3093 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I am filtering a portal where one method works and other other does not. 

 

WORKS

Case (
	IsEmpty ( table::globalTextField ) ; db_payment::id > 0 ;

	PatternCount ( table::globalTextField ; "/" ) > 1 ; 
	db_payment::date = GetAsDate ( table::globalTextField ) ;

	db_payment::invoice =  table::globalTextField or
	PatternCount ( db_payment::reference ; table::globalTextField ) > 0
)

 

 

DOES NOT WORK  

line 1 and 2 of case work but not line 3 

Let ( [
		txt = GetAsText ( table::globalTextField ) ;
		num = GetAsNumber ( table::globalTextField ) ;
		dte = GetAsDate ( txt ) ;
		dt = PatternCount ( txt ; "/" ) > 1
	] ;

	Case (
		IsEmpty ( txt ) ; db_payment::id > 0 ;
		dt = 1 ; db_payment::date = dte ;
		db_payment::invoice = num  or PatternCount ( db_payment::reference ; txt ) > 0
	)

)

 

I have simplified examples but ultimately I would prefer a Let function to allow for further options in my filter

 

Portal_filter_with_Let_function.zip

Edited by rivet
Link to comment
Share on other sites

This topic is 3093 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.