I am trying to update a card contents with the following code, but I do not think I have the write method of doing that, as it is not working. I did verify the OnChange is executing as I added a toast message to the below code.
Ah, okay, that makes sense. I changed it and I can see it updating the text, except it started throwing errors. I am trying to access the $EventData variable to post back to the user what their last change was.
I might not be doing it right, but it is like it lost scope of it. I will keep playing with it.
This is what I am using, but it seems that using the Sync, does not allow me to access the $EventData once I changed the code to point to the correct Id.
That is my fault, I should have explained it better.
There is a top UDCard that says, 'You current selected â.
User select a choice from a dropdown and clicks âsubmitâ, it should change the UDCard content to say, Your new selection is â.
Before adding the Sync & Dynamic elements, I referenced the $EventData with a UDToast so I could prepare some SQL Calls. This worked perfectly. Adding the Sync & Dynamic element above (with the correct ID âcardContentsâ), updates the card, but the $EventData is null.
Thank you for your detailed reply!
The sample definitely works in a blank dashboard, something in my current layout is causing EventData to be blank. I verified that my sample is setup like yours with the exception of the form being in a card of its own and using a layout. I will toy around with it tomorrow.
I finally got it working.
I was referencing $EventData but not the id of the element that I wanted to access and since there was only one element and I did not call it as $EventData.Selection; it came up null. Though, I would expect it to still return the main object âSelectionâ, or I could be wrong?