Update Fields on Page Load

I have a page with numerous input fields on it that allows a user to update fields for their profile.

Once done, they click “Update” button and these new values get written to the database. There are also some fields that are not undateable and are populated by conditional logic that changes based, for example, on the current date.

In order to get the “most recent” view when the user views the page, I’d like to programmatically update the fields on page load. Essentially, when the page loads, the “update” button is programmatically “clicked” and the fields are updated.

I’ve tried this w an “on page load” event to Run javascript using toolbox


But it doesn’t seem to run

Ideas??? Much appreciated.

… wouldn’t all these inputs be part of an update flow that is triggered on how the view is registered? … perhaps page is loaded is an overkill but it seems that this is what you are referring to …

Hmm, what am I missing here, @mfsmillie? Can’t you just use a Page is loaded workflow event and include the necessary actions in that workflow? In other words, there is no need to “programmatically click” the update button… just run the actions you need to run in the Page is loaded event.

1 Like

brilliant minds think alike Mike :sweat_smile:

1 Like

OK, yep… ok.

As a test, here’s what I got. When the page loads, the event does not show the alert.

Screenshot 2024-01-18 at 11.28.21 AM

It’s not possible to know from just that screenshot why the alert isn’t showing. What is the debugger showing?

Not showing anything when debugger is running on upon page load nor in server logs

What does the alert element look like? What does the alert action look like? Where is the alert supposed to appear? And more questions like that. :wink:

1 Like

It’s like a toast bar at the top of the page that is teal and says “Updated”. It should appear on page load and fade out over a couple seconds.

So weird. I literally have a “page is loaded” event and then “show popup” on page load. And nothing happens.

And nothing in the debugger. zoom?

Nah, a zoom is overkill on this one. :wink:

Something is probably happening, but maybe the alert is hidden or something. I just tried a page is loaded workflow with a simple alert, and it works exactly as expected.

I tried it on another page and it worked fine as well. something hiding the pop up and alert. Good for now. thanks!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.