Learning javascript

hello, slightly off topic but wanted to ask for some advice in where to for improving my JS for Fibery scripting.

Looking over the pages of the Fibery manual I’m at a bit of a loss where to start. Some of the syntax looks like JSON (what do I do with that?), and the more familiar code examples I’ve found on the forum here seems straight forward but even basic stuff I’ve hacked together just fails to run so clearly I need to start with fundamentals.

Professionally I’ve worked in tech as a PM for 20ish years with plenty of exposure to APIs, complex builds, helped my team debug issues and actually used JS a bit in the early 2000s as a webdev (just pre-jquery DOM manipulation). I know SQL well and have built personal projects in PHP, R, XSLT and FileMaker. For API work I’ve always used a middleware like Yahoo Pipes or make.com.

I’d like to take a couple of quick courses to make myself effective in Fibery Scripting quickly, but hopefully avoid the basics that I’ve done a million times before (if/then, data types, etc). Any advice would be welcome :slight_smile:

Not quite what you’re asking for, but – if you post a question here about how to accomplish some specific scripting task, you are likely to get a working answer (if it’s not a huge task).

1 Like

Thank you Matt, I will do. This post was in part frustration posting due to failing to make a quick but relatively low value experiment to show an alert window for the length of a rich-text field to make sure it fits into a snippet. Every time I tried anything I got Failed to execute Action "Script": Unexpected token So I gave up after an hour or so.

I was just writing it up to see if it’s easy to help me, and I just noticed a missing curly bracket. So now I have a working script to start :partying_face:

Related to the OP, I’m thinking about doing this over an afternoon in the next week or so: https://www.udemy.com/course/mastering-javascript-oop-ajax-apis-json-and-beyond/

Fibery scripts execute on the Fibery server, not in your browser, so the “normal” javascript environment is not available for scripts - this includes document, window and related functions like setTimeout() and alert().

There is also no javascript debug support - specifically, no stack trace on errors - so you need to debug using console.log(), which messages will show up in the “Activity” tab of the Automation definition page (and for Button scripts, also in your browser’s dev console).

There is no way for scripts to affect the UI (apart from returning a status message), e.g. no way to trigger a browser alert window.

3 Likes