Hi all,
I'm working to create an app that uses TinyDB, utilizing Web1.JsonTextDecode and such.
The code is supposed to:
- Add a time frame
- take the text from a textbox (Timeframe)
- take the selected date for the DatePicker (startDate)
- take the selected date from another DatePicker (endDate)
...and save this to TinyDB and display them to a ListView ("ListView_Timeframes").
- Delete a Selected Timeframe
HOWEVER, I am getting the following error upon booting in AI companion: "the The operation Elements cannot accept the arguments: , [""]"
It also displays this error when "add timeframe" button is selected (and the fields are populated).
Here is the pseudocode I am working on:
// 1. this is a nav button that takes you to a previous menu
when Be_Button5_BackToMain.Click do
open another screen screenname to (BE_MENU)
// 2. Here, I initialize several variables
initialize global timeframes to ""
initialize global selectedTimeframe to ""
initialize global tfDateStart to ""
initialize global tfDateEnd to ""
// 3. Screen Initialization
when BE_Define_a_Timeframe.Initialize do
set global timeframes to
call Web1.JsonTextDecode jsonText
call TinyDB1.GetValue
tag "timeframes"
valueIfTagNotThere ""
set ListView_Timeframes.Elements to
get global timeframes
set labeldebug.Text to
get global timeframes
// 4. When-Do once dates are picked in datepicker
when DatePicker_tf_start.AfterDateSet
set global_tfDateStart to
DatePicker_tf_start.Instant
when DatePicker_tf_end.AfterDateSet
set global_tfDateEnd to
DatePicker_tf_end.Instant
// 5. When-Do on Add Timeframe Button Being Clicked (3 Things that need to happen)
when Button_AddTF.Click do
add items to list
make a list
TextBox_tf_Name.Text
get global tfDateStart
get global tfDateEnd
call TinyDB1.StoreValue
tag "timeframes"
valueToStore
call Web1.JsonObjectEncode
get global timeframes
set ListView_Timeframes.Elements to
call Web1.JsonTextDecode jsonText
get global timeframes
// 5B. Here is some code we wrote that I don't quite remember the purpose of
when ListView_Timeframes.AfterPicking do
set global selectedTimeframe to
ListView_Timeframe.Selection
// 6. When-Do on Delete Timeframe Button Being Clicked (3 Things That Need to Happen)
when Button_DeleteTF.Click do
remove list item
list get global timeframes
index get global selectedTimeframe
call TinyDB1.StoreValue
tag "timeframes"
valueToStore
call Web1.JsonObjectEncode jsonObject
get global timeframes
set ListView_Timeframes.Elements to
call Web1.JsonTextDecode jsonText
get global timeframes
And here are some screen shots:
Thanks in advance for any help!