ContributionsMost RecentMost LikesSolutionsCode Page - Refresh not working I have a URL Formula button on a record form, whose purpose is to prompt user for text input, update a text field with that input, and change status of record to "Done". I used the "Prompt for Input and Refresh" example in the code pages samples: https://resources.quickbase.com/db/bq8mgh24g?a=dr&rid=10414 After clicking the button, the field value updates, but the rather than display the record refreshed, I get an error: 404 Error, Page Unrecognized. So the first part of fetch code is executing correctly, but it seems the redirect is what is failing. Any help would be appreciated! Here's my button code: var text urlToExecute = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&apptoken=MYAPPTOIKEN&rid=" & [Record ID#] & "&_fid_26="; URLRoot() & "db/" & AppID() & "?a=dbpage&pageid=5" // Open code page 5 & "&url=" & URLEncode($urlToExecute) // Pass the URL to execute Here's the script and form portion of my code page 5: <script> function run() { $('#form').hide(); $('#status').show(); const input = document.getElementById('input').value; let urlParams = new URLSearchParams(window.location.search); let url = urlParams.get('url') + encodeURIComponent(input); let redirect = urlParams.get('redirect'); let landing; if(redirect){ landing = redirect; }else{ landing = document.referrer; } fetch(url, { method: 'post', mode: 'no-cors', headers: { 'Content-type': 'text/plain' } }).then((response) => { rdr(landing); }) } function rdr(landing){ // Redirects to the specified landing page, if this page is the landing page as well, then redirect to the app home page if(landing && landing !== window.location.href) { window.location.href = landing; }else{ window.location.href = window.location.origin + window.location.pathname; } } </script> <div class="container" id="form"> <h2>Input Needed</h2> <form onSubmit="run();"> <div class="form-group"> <label for="input">Please provide some input</label> <input class="form-control" id="input" autofocus> </div> <a class="btn btn-primary" onclick="run()" role="button">Submit</a> <a class="btn" onclick="window.location.href = document.referrer;" role="button">Cancel</a> </form> </div> <div class="container" id="status" style="text-align:center" hidden> <h2>Making API Calls, will redirect once complete.</h2> <div class="loader" id="loader"></div></div> <br> </body> </html> Re: Dashboard FilterI also noticed that when I create a brand-new dashboard, there's no filter option, just boxes for widgets: Even after adding widgets like Buttons and Rich Texts, no filter available. But as soon as I add a report widget, to which a filter can be applied, then the "add filter" option appears when it's unlocked: Not sure if this is the issue you're seeing, but maybe? Also, you mentioned that you have show filters checked... where is that option on dashboards? Anthony ------------------------------ Anthony Guillen ------------------------------ Re: Case Function Syntax Error This is an old post that no-one had answered, but I was having a similar issue and so thought I'd post my solution in case anyone else comes across this. It seems that Case function can't handle inequalities, seems to only do a simple match i.e. in Case(X,Y,Z), it only checks if X=Y. However, found a work-around in the Sample Formulas public app: https://login.quickbase.com/db/bcgahn76w?a=q&qid=-5636905&dr=1 To summarize, in my Case(X,Y,Z) example, you can use "true" or "false" as X and simply put the full inequality statement as Y and then Case will compare the "true" or "false" in X against the result of the inequality. Example from the Sample Formulas App: Case(true, [percent complete]=0,"not started", [percent complete]<1,"in process", [percent complete]=1,"complete","") ------------------------------ Anthony Guillen ------------------------------