Groups
Sign in
Groups
weewx-user
Conversations
About
Send feedback
Help
Cheetah Template --see if a variable contains a certain string value
66 views
Skip to first unread message
storm...@gmail.com
unread,
Sep 13, 2021, 8:33:59 PM
9/13/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to weewx-user
Wondering if there is a way using Cheetah to check for a string value in a variable.
gjr80
unread,
Sep 13, 2021, 8:41:44 PM
9/13/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to weewx-user
Simple, just some in-line python code. Something like (untested):
#if 'some_string' in $my_string
## 'some_string' is in $my_string,
do something
#pass
#else
## 'some_string' is not in $my_string,
do something else
#pass
#end if
Gary
storm...@gmail.com
unread,
Sep 13, 2021, 8:46:01 PM
9/13/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to weewx-user
Thanks Gary for quick response. I will give that a try.
storm...@gmail.com
unread,
Sep 27, 2021, 12:15:33 AM
9/27/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to weewx-user
Sorry Gary been a little busy here. Yes it does work.
Reply all
Reply to author
Forward
0 new messages