View Single Post
Old 05-08-2021, 07:03 PM   #98
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
I think str_in_list() is a good answer.

Quote:
Originally Posted by chaley View Post
It isn't clear to me what the expression is looking for.
I was using it in action chains conditions where some variables can return empty values, so I had to nest the value in if statment to make sure it is not an empty string:

Code:
program:
	clicked_column = list_item(globals(_event_args), 1, ',');
	if clicked_column then
		if clicked_column inlist field_names('is_multiple:true,is_names:false') then
			'true'
		fi
	fi
Turns out there are other problems with the above code that I did not take into consideration: if variable is not anchored, #my_custom_col passes for #my_custom_col_1

Edit: The below code is working well

Code:
program:
	clicked_column = list_item(globals(_event_args), 1, ',');
	tag_like = field_names('is_multiple:true,is_names:false');
	str_in_list(tag_like, ',', clicked_column, 'true', '')

Last edited by capink; 05-08-2021 at 07:11 PM.
capink is offline   Reply With Quote