Search Support
-
Andrzej PaslawskiAugust 24, 2016 at 4:39 am #2472
Hello,
I think I may have found a bug.
On my page I have got a Table , and an Integer filed with a formula where I do this:
SUM(${Table1/rowTotal1*})
It works usually, but sometimes when I delete a row in a table I get this error:
Error executing formula expression for view /total1 (UID=14): this.context.binding is null
and the field formula shows 0 (not a correct value any more).
It seams that when I delete always the last row in a table it works fine, when I delete a random row I get the error.
Regards
Andrzej
SPARK SupportAugust 24, 2016 at 10:59 am #2478Hi Andrzej,
We have previously identified an issue with the Table control comparing the index of the UI control to the index of the backing bound data. The issue with the SUM formula appears to be related to the bug fix that is currently in the works. I have logged a new bug for the SUM formula to be tested when the fix for the Table control’s indexing is implemented in an upcoming release.
Thank you for the feedback.
Regards,
Stephen P.
Cindy ChastangSeptember 16, 2016 at 9:35 am #2657I’m wondering if this bug could be causing an issue I have with the table. I am using v4.4.1EE of the toolkit.
I have a table with 2 columns and a button to add a row. The button uses appendElement in the OnClick event and that works fine to add a row with blank values. The End User can then add the data directly in the table.
Then there is a save button that triggers a validation to ensure that all rows added have been populated with data. I have observed that when walking through the table doing the validations that when the last row is newly added – and empty – the validation does not trigger the error. Through the console I can see that is is picking up data from a prior row.
Here’s the scenario:
- add a new row & leave the fields blank – validation fires and correctly shows the error
- fix the problem by entering the data – validation fires and reports success
- add a 2nd row & leave the fields blank – validation fires and reports success when it should report the error
- through the console I can see that the data it is picking up for the 2nd row is actually the data in the first row.
- fixed the 2nd row – added a 3rd row & left the fields blank – validation fires and reports success
- here through the console I see the first row reported twice
- If I save and close the coach and reopen it the validation will fire correctly and report the correct errors.
I have attached screen shots of the table and the console messages for the 3 rows
SPARK SupportSeptember 16, 2016 at 10:58 am #2661Hello Cindy,
I think you are seeing this error due to the fact that the appendElement() adds by reference instead of by value. Please share a screen shot of your validation code.
Regards,
Stephen P.
Cindy ChastangSeptember 16, 2016 at 11:06 am #2662Thanks for the quick reply. Here’s a screen shot of the validation
SPARK SupportSeptember 16, 2016 at 12:05 pm #2665Hi Cindy,
Based on your console output, it looks like this may be an indexing issue with the table. Try this: add a button to your table row, and set the Label Formula in the config options to me.ui.getIndex(). Then screen shot your table as you add rows and input data.
Regards,
Stephen P.
Cindy ChastangSeptember 16, 2016 at 1:11 pm #2668Some really odd things are happening with the index when the save happens and the flow leaves the coach and comes back. I put all the screen shots in a document so you can follow the steps I took.
Cindy ChastangSeptember 16, 2016 at 1:16 pm #2670We implemented an autosave following one of your articles to save the coach every 5 minutes – while I was putting together the screen shots into a document it fired a few times and look at the index #s now.
The navigation event flows to the same service to save the data into our external db then back to the coach (for some reason here we didn’t use a Stay on Page)
SPARK SupportSeptember 16, 2016 at 1:46 pm #2672Hi Cindy,
Try adding your function into the Inline JavaScript of your Coach View or add it to a Custom HTML control instead of using the Stay On Page. Otherwise, you will need to modify your function to work directly with the bound data.
Regards,
Stephen P.
Cindy ChastangSeptember 20, 2016 at 2:05 pm #2682Thanks Stephen – We are going to modify the validation function to work directly with the bound data. That seems to be the most straightforward solution.
SPARK SupportSeptember 21, 2016 at 2:07 pm #2724Hi Cindy,
You’re welcome. Let me know if you need any further assistance.
Regards,
Stephen P.
-
|
You must be logged in to reply to this topic.