Best Of
Re: Any Way to Use Regular Expressions to Change Case of Specific Words
Hi pstrauss,
You can do this in a MagicETL. The best way I've found to do this is using the Python Scripting Block. In the example I put together for you, I wanted to make it simple to configure which words end up capitalized without having to reconfigure my ETL every time I want to add a new preposition. In the design pattern below, I just used a Domo Webform to store a list of my words so all you need to do is pop new values into it.
1) There are 2 data sources in this ETL. The first is a table containing rows of articles text. The second is my dataset of prepositions.
2) Connect both sources to a Python Scripting block and add the python code shown in the screenshot at the bottom of this post.
3) Make sure you change any references of 'Articles' or 'Prepositions' to match your dataset names. Then, change 'ArticleText' in the code to whatever the column name is in your articles dataset.
4) Once you make sure all dataset name and column name references match your existing datasets, run a preview and check the 'SCHEMA' tab on the Python Script block to ensure it's properly picking up the output schema.
You'll notice a simple capitalise() function. All it does is take your prepositions dataset and convert it into a list. Then it takes your article dataset and converts the article text itself into a list. It then goes through your article text and checks to see each word is in your prepositions list. If it is, it capitalises it with the title() function. If not, it leaves that word unmodified.
What you are left with is an output dataset where the article text has your prepositions capitalized because we've run a pandas apply() function to your article data and telling it to execute the capitalise() function on your data.
Edit: I just realized you wanted to opposite of capitalizing, and instead lowercasing your prepositions. Thats easy enough to do by changing the "v.title() if v in list..." to "v.lower() if v in list..."
Apologies for the mix up! This should still get you 99% of the way there. I hope this helps! :)
Python Script
Articles Dataset
Prepositions Dataset
Final ETL Output
Notice all instances of and, to, from, the, with are now all capitalized
Re: Can you remove filtering capabilities for specific card level for Participants?
You can't conditionally show or hide different filtering options. If you're looking to restrict the records returned for specific users you can look into PDP to automatically do filtering so they won't be able to see other records.
Re: How can I get rid of HTML table/cell borders?
Hey @GrantSmith thanks for getting back to me on this!
I found an interesting (but, limited) workaround that I thought I would share here. I knew that I could change the cell background color of an HTML table with a div tag, so I then thought, "What if I change the cell background color to match the default table border color?"
So, I took a screenshot of my table and uploaded it to a website that takes an image input and enables the user to pinpoint a specific pixel on the image and retrieve the hex code. I found the hex code of the default Domo table border color to be #cccccc (like a semi-dark grey). I then added the following code to the beginning of my Beast Mode:
CONCAT('<div style="background-color:#cccccc; border:10px white; border-collapse: collapse; color:black; margin:-10px; padding:10px">',
After the comma, you simply add in whatever Beast Mode code you had written before and then be sure to end the Beast Mode with ,'</div>') to close off the original CONCAT function.
This left me with an HTML table card that appears like a paragraph of text! The only caveat with this method is that you have to stick with the #cccccc hex code.
Re: How do I remove the "Warning: Not All the Data is Shown" from a filter?
Yes, I often add the same field into the optional group by and choose to count.
You can accept your answer so that people know it is not an outstanding question and it will help others that run into the same issue.
Re: Filter is removing nulls plus specified value
@NateBI Nulls don't play well with logical operators. Null isn't the same thing as nothing, it really means that the value is unknown. Is null blue? SQL doesn't know so it treats it as if it meets the condition.
You can use a formula rule to get around this:
IFNULL('status','') = 'Blue'
This will replace your NULL value with a blank which it can evaluate in the comparison.
Alternatively, you could use the formula:
'status' = 'Blue' or 'status' IS NULL
Re: Single Value Card - No numeric abbreviations
@MarkSnodgrass Thanks Mark this helped me today!







