I am new to PowerShell Universal and trying to use pages to build out a basic interface that can create DNS records and display them. My page has a form and a table. The form takes in a user text input and runs a script that generates DNS records based off the text input. The table runs a script that pulls in a subset of current DNS records that the user could use to confirm existing entries and the new entries created by the from.
The from works, I can create new DNS entries but refreshing the table to pull in the new data has been problematic. I figured out the table does not run the actual script but just pulls output from the last time the script was ran as a job. My hope was to figure out a way to allow the user to manually run the script and refresh the table by using the optional refresh button that you can enable in the table.
I figured out that if I create separate button and set that button to execute the same script referenced by the table, that I can at least force a job to run the script. But the refresh button on the table will not pull in this new jobs data and continues to display the prior data. If I refresh the browser after clicking the button it will pull the latest jobs data into the table.
Guessing this is where my lack of understanding how sessions work is getting me but I would like to see if it is possible in pages to allow the form to update the table after it has executed or allow the user to click refresh on the table to force run the script and pull in the latest job data. Using an additional button and hitting F5 is not intuitive for a user. If I need to do this as a dashboard that is fine, just wanted to see if it could be done in pages first as a POC so I could sell it to the bosses on ease of use so we can justify getting license.