Joseph Francis
Posts: 0
Joined: Thu Sep 04, 2014 8:52 pm

New Interface: Generated Application Fails to map data correctly

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.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

New Interface: Generated Application Fails to map data correctly

Hi Joseph,

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

Joseph Francis
Posts: 0
Joined: Thu Sep 04, 2014 8:52 pm

New Interface: Generated Application Fails to map data correctly

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.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

New Interface: Generated Application Fails to map data correctly

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.

Joseph Francis
Posts: 0
Joined: Thu Sep 04, 2014 8:52 pm

New Interface: Generated Application Fails to map data correctly

OK, I will upgrade and retry. Many thanks.

Joseph Francis
Posts: 0
Joined: Thu Sep 04, 2014 8:52 pm

New Interface: Generated Application Fails to map data correctly

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!

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

New Interface: Generated Application Fails to map data correctly

Hi Joseph,

Thanks for your update.

Yes you are right. Current implementation more strongly typed.

Regards.

Return to “Issues”