0

I have a custom function in a sheet that calls a mysql database. It extracts one value from mysql per row, e.g.

  | A   |  B
--------------------------------
1 | YES |  =readCompleteFromMember(A1)
2 | NO  |  =readCompleteFromMember(A2)

If I let my laptop go to sleep and open it the next morning, without closing the sheet, I get #ERROR

Internal error executing the custom function.

in every cell in col B. Refreshing ctrl - r or closing / opening she sheet does not fix it.

I can work around it by editing the function and saving it. I add a blank line somewhere, save, and the whole thing sorts itself out.

Is there a better way?

Jepper
  • 982
  • 3
  • 10
  • 22

1 Answers1

0

Henrique provides a good explanation of why custom functions like this don't update in Script to summarise data not updating.

It comes down to an optimization decision in Google Sheets; a custom function will only be re-evaluated if its parameters have changed.

Try to set up an onOpen trigger to make an inconsequential change - like delete & re-add something in column A.

Community
  • 1
  • 1
Mogsdad
  • 42,835
  • 20
  • 145
  • 262