Show updated field in script?

I have this silly button-script getting a random Chick Norris joke and updating a field in the current record/form. But the update (new joke) only appears if a refresh my browser tab. How can i have the button-script update the browser tab immediately after the scrip is finished?

const response = await fetch(“https://api.chucknorris.io/jokes/random”);
if (!response.ok) { throw new Error(API failed: ${response.status}); }
const payload = await response.json();

if (!input.recordId) {
throw new Error(“No record ID provided.”);
}

const host = await base.getRecordById(input.recordId);
if (host) {
await host.setCell(“joke”, payload.value);
await anydb.yield();
}

console.log(payload.value);

Thanks for the report, we are checking this.

We see the problem in the popup record view. We will check and address this.

However, it looks like if you do this in the expanded full record view, the data is flowing correctly.
See video below:

Hi, this issue has been resolved. Please refresh your browser and try this action again!

Thanks, works now perfectly!

Nothing better then getting a fresh Chuckle very now and then

1 Like

Chuck Norris jokes never get old!

Chuck Norris doesn’t get old… age is too scared to creep up on him.