Error when using postValues from api #325
-
I'm trying to create a button that will update a field when pressed. My ultimate goal is to integrate this with the Dice Roller plugin to update values based on a dice roll. For now I'm just trying to get the metadata-menu api to work by itself. I have the following basic test code:
The button renders, but the field does not update when I click it. I also get an error in the console:
If I take out the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
After doing some more testing, I found that |
Beta Was this translation helpful? Give feedback.
After doing some more testing, I found that
postValues()
only accepts strings as values. I got numbers to work withnewValue.toString()
with the number still able to increment like normal after running the script. Similarly for dates (though I haven't found a way to manipulate a date, then convert it to a string). Links work if you wrap the text with'[[]]'
. I haven't tested any other field types, but they would presumably work like the rest.