/ How Code Blocks can make problem solving easier

Thanks to the flexibility of the Domo platform, you can create solutions with data that can help you answer even the most complex business questions.

However, sometimes you cannot even begin to answer complex business questions without first doing some coding to enhance or automate data.

While some technical users might not mind rolling up their sleeves and digging into SQL or R, this can be a big hurdle for non-technical business users who are looking for answers and don’t have time to kick off a new technical project.

Even some technical users may wonder why they have to reinvent the wheel and write the code from scratch when surely it has already been written by somebody else, somewhere, at some point.

So, we thought: Why not share some of that code? That’s the idea behind Code Blocks, a new capability you can now access in the Domo Appstore.

What are Code Blocks?

Code Blocks are pre-written chunks of code that you can copy and paste. While you likely have a file of similar code chunks you reference time and again, before now there was no central place to easily search, find, and share these snippets with others.

With Code Blocks, Domo users now have a central library of pre-written code they can plug and play into their project, helping save time and effort creating code from scratch.

Code Blocks are available for the following languages:

  • Beast Mode
  • SQL
  • R
  • Python
  • Juptyer Notebooks

If you’re a coder, this helps you save time writing code that’s already been written. In addition, Code Blocks are a great way to discover and leverage existing best practices by seeing how peers have solved a specific solution.

If you’re familiar but not proficient with a language, Code Blocks also serve as great references for learning how the code works. And if you’re not technical, this can save you from having to put in a request for a technical resource to write code for you.

By using already-existing code, you can significantly reduce your time to value and get more done.

How to work with Code Blocks

Using Code Blocks is easy. Simply go to the Domo Appstore and either browse the Code Block capability or search for a Code Block.

Once you’ve found the right Code Block, all you have to do is copy and paste it into the rest of your code, adjust the parameters, and you’re done.

Here are a few more things worth knowing about Code Blocks:

  • While Code Blocks are open-source, they’re only accessible through the Domo Appstore. 
  • Code Block authors can leave notes in the code indicating which values can be changed. Make sure you change those values to fit your needs. For example, if using the Sort Column Code Block, make sure you input which column you want to sort.
  • Because you’re only copying and pasting code (and not linking to it), keep in mind that the code will not update even if the Code Block itself receives modifications in the future. 

We’re currently hard at work creating Code Blocks for the Domo Appstore. We’re also asking customers and Domo experts to submit their own Code Blocks so they can share expertise with the rest of the community. To do that, click here. To learn more about Code Blocks, check out this page in our Knowledge Base.

Try Domo now.

Watch a demo.