Setting text widget fails

I’m currently unable to set the text on a field widget. I’ve had it work every once in a while, but most of the time it fails silently. Here are some of the things I’ve tried:

set the text of widget id 1026 to empty
set the text of widget "Date" to empty
set the text of widget id 1026 to the short date
set the text of widget "Date" to the short date

First two were in a button script on the same card (layout).
Second two were on the card script that contained the widget.

Hi Brian,

It works for me in a button in the web version on Google Chrome (Mac) as well as in LC Create native on the desktop for DP1

In a button

on mouseUp
   if the text of widget "date" is empty then
      set the text of widget "date" to the date
   else
      set the text of widget "date" to empty
   end if
end mouseUp

Kind regards
Bernd

Hi @bwmilby can you reproduce this issue in the latest version?

I’m on a MacBook Pro 16 inch 2019 (Intel i9); Sonoma 14.5; Chrome 127.0.6533.120
I tried deleting settings in Chrome (which wiped out my Collection)
I build the app once, deleted it, and built it again with the same issue.

I don’t have access to Create Native yet.

I added a layout with just 2 controls (button, field) and Bernd’s code works.
I then added a simple list, pointed it to the same collection and added the filter action.
Button still set/cleared the date, but the “textchanged” action does not fire.

I then added a button to the original layout and copied Bernd’s code into the script of that button and it does nothing.

Next, I deleted the field and created a new one. Didn’t work while named “date”, but I changed the name and it worked for a bit. I added the filter action and it continued to work. After manually changing the data in that field it stopped working.

After seeing that result, I went back to the layout I created to test Bernd’s code. As soon as I edited the value in the field, the button stopped working.

I just got Native and am seeing the same behavior there. Once the field has been manually edited, setting in code seems to fail.