Page 1 of 1

New Interface: Generated Application Fails to map data correctly

Posted: Thu Oct 09, 2014 6:19 pm
by Joseph Francis

I upgraded to the new interface, second time. It looks wonderful.
However, this time when I run my application, the very first database query which is to get multiple row results fails to iterate over an array of query results, mapping each row to a local "javascript".

e.g.
get all database rows matching "active"
Network data shows 6 rows resulting
the mapping previously taking $[] row to a 'javascript' would call the element 6 times, once for each result.
Now it calls the 'javascript' only once, for the first element, remaining five elements are discarded.

I added a 'local storage' item that was to simply debug what was the output ("debugReturnData"). I could see it in the screen, and was mapped to the $[] object so it would iterate over rows, but I got a console message "Uncaught Error: Storage 'debugReturnData' not found" so I couldn't even add to the existing mapping with a new storage item, the initial test, with no other changes to my system, simply returned a fail.

I have to roll back a second time now. If all my prior database queries fail, it renders the new interface wholly unusable.

It's not very stable.


New Interface: Generated Application Fails to map data correctly

Posted: Thu Oct 09, 2014 7:05 pm
by Kateryna Grynko

Hi Joseph,

Could you please post screenshots of service mappings and what you get?


New Interface: Generated Application Fails to map data correctly

Posted: Thu Oct 09, 2014 11:40 pm
by Joseph Francis

Kateryna, I'm sorry but I had to back out the upgrade entirely, I didn't have the time to try to see the behaviours.

This service mapping is what I had pre-upgrade:
Image

And this is the code inside the javascript that was called:

Image

In the pre-upgrade, I have six valid records selected, and the javascript fires 6 times.

In the post-upgrade, I have six valid records selected (seen via network traffic), and the javascript fires once, for only the first record of the list.

There's literally nothing changed from pre- to post-upgrade.


New Interface: Generated Application Fails to map data correctly

Posted: Fri Oct 10, 2014 2:17 am
by Yurii Orishchuk

Hi Joseph,

In new editor it works in following way:

  1. Open "Storage and models".

  2. Add new model with type "Array". http://prntscr.com/4uey7v/direct

  3. Add storage with type model from 2nd step. http://prntscr.com/4ueyq8/direct

  4. Navigate to "success" mapping.

  5. Make link from "$" to storage from 3rd step: http://prntscr.com/4ueyzi/direct

  6. This time you can click on "JS" for link from 5th step and add goal JS code you need. And this code will execute every item from response.

    That's all.

    Regards.


New Interface: Generated Application Fails to map data correctly

Posted: Fri Oct 10, 2014 1:57 pm
by Joseph Francis

OK, I will upgrade and retry. Many thanks.


New Interface: Generated Application Fails to map data correctly

Posted: Fri Oct 10, 2014 2:15 pm
by Joseph Francis

I put the change in, and it worked perfectly. So far in testing it's the only issue I've seen with the interface upgrade.

Basically, it looks like you're implementing more strongly typed storage (nice) which makes the free-for-all with local/window/application storage more systematic.

Thanks!


New Interface: Generated Application Fails to map data correctly

Posted: Tue Oct 14, 2014 1:33 am
by Yurii Orishchuk

Hi Joseph,

Thanks for your update.

Yes you are right. Current implementation more strongly typed.

Regards.