FlowFest is a 50-minute, virtual, live-streamed hackathon style competition. Competitors battle it out to create a series of flows, each becoming more and more complicated. Fourth version of FlowFest, FlowFest V4, took place on February 22nd, 2023. Just like the previous events, FlowFest V4 was hosted by Salesforce Ben and Ohanaly. This time, the format was a little different. After completing the first 3 challenges, 4 finalists were selected and they shared their screens for the final challenge. Let's see the challenges of FlowFest V4. Here is the answer of FlowFest V4 - Challenge 1.
FlowFest V4 - Challenge 1 - Question
Universal Containers is looking for a quick method to deactivate products within their organization. For this they are counting on new Winter ‘23 features that allow them to quickly do that from anywhere in the system, without the need of depending on List Views.
The users requested that they could use a text field to search for a set of products. The goal is that the table of data (hint) to select the active products would show any products that contain the text values entered in that field. To help users select amongst the products available to be deactivated, make sure that Product Name, Product Class, and Product Code are easily visible.
Make sure users are required to select at least one (1) product.
Once you are done, but before submitting, make sure to store the following information on the variables that are included in the Flow:
- Number of Products selected under countSelectedProducts
- Text field input value under txtProductFilter. Note: We will provide you with the text input below.
When you are ready to debug, make sure to run the debug with the instructions below.
Submission Variables:
NumberAnswer1= {!countSelectedProducts}
TextAnswer1 = {!txtProductFilter}
Debug Instructions:
Text input = "Diesel" and then select all products displayed.
FlowFest V4 - Challenge 1 - Answer
1- Add a screen element with one required text input component. Users should be able to enter a text to filter the products.
2- Add a get records element to find all the active products that their names contain the text that the user entered. Make sure to store all the records.
3- Add a new screen element with a data table that displays all the products that you found in the previous step. Configure the data table to allow multiple selection. In order to make it required, set the minimum selection as 1. Add 3 columns for Product Name, Product Class, and Product Code.
4- Create a number variable and add an assignment element. Assign the selected record count to the number variable.
5- Add a loop element to iterate over selected products. Add an assignment element in order to assign new values (make the products inactive) to the records and then add the temporary record variable to a collection. Read this post to learn how to work with collections in flow.
6- Add an update records element in order to update all the selected products at once.
At the end, your flow should look like this. The last subflow submits your answers, it is not a part of the challenge.
Submission Variables:
NumberAnswer1= 3
TextAnswer1 = Diesel
FlowFest V4 Challenges
Here are the answers of all the FlowFest V4 challenges.
1st Challenge
2nd Challenge
3rd Challenge
4th Challenge
I would like to suggest a correction regarding the decision element. I think there should be a decision element after the 'get product' step for null check. This will help us ensure that we have a valid product list before proceeding further. What do you think about this suggestion?
Yes, it is a good suggestion.
In this flow we are displaying the results in a data table. If there are no records that meet the criteria, then the data table would be blank. I think in this case (in a real life scenario) there should be a decision element or maybe you can hide the data table.
We provide a set of records at FlowFest and we make sure that there are records that meet the criteria. However, as I said, it would be a good improvement to the flow.
Thank you so much for taking the time to break these challenges. Will do in my org to learn them better. Thank you so much!
You are welcome Pedro!