I’m trying to build my first Monday.com app, but I feel like some of the documentation is sorely lacking (or at least, the existence of a few example projects).
I found the Quickstart board view github page here, but there are a couple things even the preview image on that page does different than the actual code. The image shows information about items in the board and being able to change the background color, but I can’t find anything in the code that pulls in that information or handles the changing of the background color.
Anyway, my main issue is that right now I’m just trying to create a simple new view for an item. For instance: click on item on board, select my new view, and see information about that item displayed (ie. item name, maybe the value of a status column or something).
But I can’t find any example that does anything like this, so I’m a bit lost. I’ve found this topic and even tried the provided code but it doesn’t work. When I click on my item view, nothing is printed to the console log.
I’d love some assistance if possible.
Hello there @aholtzhauer,
I shared your feedback about the documentation in the Github example app. Our team will take a look into it!
Regarding what you want to do, you can create your custom app, then in it, create an item view feature and in your script, you can use our SDK to get that information.
You can get the context where the app is being used and you could also (after getting the relevant IDs from the context) use monday.api as explained here, to send a query to our API and get any information you want (such as the column values for some item).
I believe this would be the easiest way to tackle this.
What do you think? Is this what you were looking for?
I appreciate your time with helping me. My issue is that whether I do
monday.get("context"), neither seem to fire when viewing the added view in my item. I’ve got a log statement that I’ve tried using with either line of code that doesn’t work when viewing my item, but it does work when viewing the basic “app” when viewing the “widget setup” (which doesn’t help me because I should only be caring about the single item I’ve clicked on).
Any idea why I’m able to get the context at the widget setup page but not when I click on the view for my item?
If I understand correctly, the app is logging it correctly when you test it in the developers section, but not when you add it to an actual item. Correct?
If that’s the case, I’d try the following to troubleshoot:
Check that you’ve created a new build for the app, and it points to the right code. When you add the app to a board/item, it renders the most recent build (either uploaded or via an iframe URL). When you view it in the widget setup section, it renders either the Preview URL or the most recent build.
Check if you’re adding the right version to your board. If you have multiple versions of your app, you’ll see all of them in the item view selection screen. Check that you’re connecting the right one.
Hit refresh. Sounds obvious, but if you’re testing and configuring your app in two different tabs, chances are that the testing tab is using some old data. Hit refresh so that your browser fetches the most recent configuration for your app.
Well don’t I feel silly… I never created a build using the URL/uploaded zip and was just viewing the preview URL in the widget setup.
Thank you! I should be good to go from here.
I’m glad to hear you could solve this with the amazing help from our amazing @dipro!
Let us know if you need anything else in the future