Dynamic Filtering of Page

willrnt
willrnt Member
edited July 2022 in Charting

Greetings Domo Community,

I have been working to apply a dynamic (Beast Mode type) filter on a dataset that can then display a card. In simple terms, we would like to be able to filter a subset of a dataset, based on a defined algorithm that we implement on our card and then dynamically power cards using this subset (Example filter where first name is the same first name as the person with ID 1234).

Here are the things we have tried so far….

1.      We tried to implement some sort of filter on a card that we can use to manipulate the data to get a new filter on a set of keys. Unfortunately, every attempt down this road failed. Any advice on whether there is some sort of beast mode filter / workaround would be greatly appreciated.

 

2.      Another attempt was to use DDX bricks. We tried to build a dummy dataset which the intention of continuously updating it via the DDX brick and then powering cards off the dummy. We were successfully able to build the subset that we wanted to view; however, we were unable to get this to be able to interact with other cards. One of the reasons for this (despite race conditions being a major scalability issue) was DOMOs inability to use a put request in a DDX brick. We consistently got the error PUT request not allowed from our Promise when trying to update our dummy dataset.

 

3.      From the DDX brick, we cannot pass it back to our server that can interact with DOMO API, and additionally, every attempt to use collections failed (likely user error, but please continue reading). There previously was a DDX brick that would collect survey data from a user, update a collection, and then presumably display the data stored in the collection. We were never able to even make a copy of this card and since then it appears to have been removed from the app store. Upon reaching out to DOMO support about a solution to this problem, I was directed to this link https://developer.domo.com/docs/dev-studio-references/appdb and told that I should make a new collection, update the collection and then export the data to a dataset. However, on the page there is much discussion about defining a manifest, which I was never able to find on the DDX brick (I could be missing something – and please tell me if I am). My next step was to start from the top using Step 1 to create the app (https://developer.domo.com/docs/dev-studio/step1) . An administrator would need to grant me privileges to do so, as I currently don’t have permissions to use their CLI. This could be a viable solution and I would be welcoming to going through the process to get proper permissions and building an app; however, I am reluctant to go through this long process given that in the FAQ & Known Limitations section it is stated: “Apps currently don’t have access to some of the core product features available to standard cards, such as alerts, Buzz, data export,…”, which makes me weary about whether or not I could sync this with a database (https://developer.domo.com/docs/dev-studio/faq-known-limitations). If I could truly update a database as I’m told, then I’d believe I could export that data, but again I am likely misunderstanding a key point and would welcome feedback.

 

These are the current attempts we’ve made. Again, even if a solution is to make an entire app, I must believe there is an easier way to beast mode filter a page. I would welcome any feedback from the community about suggestions or ways this problem has already been solved. Thank you for taking the time to read.

 

Best,


Will

 

Answers

  • Hi @willrnt, what is the end goal of your filtering? Is it so that only certain users can see data by default? If that is the case you will probably want to look into PDP's.

    **Was this post helpful? Click Agree or Like below**

    **Did this solve your problem? Accept it as a solution!**

  • @RobSomers Thanks for the question. The goal is not to define who can and cannot see data. Suppose an organization can see an entire page and the dataset behind it contains data

    ID Name

    -- ---------

    1000 Thomas

    2000 Greg

    1200 Adam

    1110 Rob

    1100 John

    2100 Jennifer

    Where ID's represent a hierarchy.... Hence:

    Thomas (1000) Greg (2000)

    / \ /

    John (1100) Adam (1200) Jennifer (2100)

    /

    Rob (1300)

    Then say the filter was done based on a chosen name. Then I would filter based on an algorithm to track down (or up) on an algorithm that defines how to traverse this tree (details are not important) using the id corresponding to the name.

    For example, if I want to filter on Thomas and I want this filter to show me everyone below him then:

    My algorithm would find the most significant value of ID, in Thomas's case it's the first character. And then I would filter my page on everyone whose initial substring matches that of Thomas's. I.e filtering the page to show only the names of everyone below him.

  • Doing this depends a lot on how your data is organized and what data you have available. If your employee data has id's for an employee's manager, then you could use an ETL to join the employee's immediate manager to the table and then join the table again on the manager's manager, etc. Alternatively, you could possibly do this in a card depending on how complex your org chart is. You would need to use several beast modes called something like 'Management Level 1' (Top Level), 'Management Level 2' (the next level of managers), etc. Then for each beast mode, write logic that defines what ID's correspond to the manager (ex: case when ID like '1%' then 'Thomas' when ID like '2%' then 'Greg' end).

    **Was this post helpful? Click Agree or Like below**

    **Did this solve your problem? Accept it as a solution!**