App working in kitchensink but not on web

Hi,
I have built a small app, during development I always tested using the appgyver kitchensink app for Android and iOs. Everything works fine in those apps.

When I try to use the app as a browser app, some things break - e. g. filling objects with data.
The following e. g. works correctly in the app, but not on web.
Set an appVariable with formula:
IF(IS_NULLY(appVars.app_FinalSongs_FS),[{id: params.parameter1, fields: {Titel: current.fields.Titel, Interpret: current.fields.Interpret, SongNr: current.fields.Startnummer, Punkte: params.parameter1}, createdTime: NOW()}],WITH_ITEM(appVars.app_FinalSongs_FS,{id: params.parameter1, fields: {Titel: current.fields.Titel, Interpret: current.fields.Interpret, SongNr: current.fields.Startnummer, Punkte: params.parameter1}, createdTime: NOW()}))

Any idea, what I could do to make it work on the web?

Thank you very much in advance!

Best regards -

Could you provide more information on what exactly isn’t working. Is it something not shown in the app? Is there any clear errors in browser console? Are all these values the same on both android and web?

You could use the debugger to find out the values or just render a paragraph component with ENCODE_JSON({ value: appVars.value1, value2: appVars.value2) etc

I did as you suggested. The appVar gets set. But while I can assign the properties to an element in App, it does not show in web:
I use the following formula to set the title:
IF(IS_IN_ARRAY_BY_KEY(appVars.app_FinalSongs_FS, "id", current.fields.ESCVotum),PLUCK(PLUCK(SELECT_BY_KEY(appVars.app_FinalSongs_FS, "id", current.fields.ESCVotum),"fields"),"Titel"),"<noch nicht gewählt>")

Thank’s a lot!
Cheers

image

I just noticed that the id (my selector) is a String in Web and a Number in App. Same is true for “Punkte” - both are defined as “number” data type.
The SongNr Item is a number in both web and app. Also defined as “Number”

Any idea, why that is?

If you’re binding them through input forms they’re casted to strings. Could that be the cause?

the code behaves differently on web and app. In fact on Web fields are casted to strings, while in app (not only kitchensink) they are forced to be numbers. I worked around the problem with the following formula:

IF(systemVars.runtime==“web”,STRING(current.fields.ESCVotum),NUMBER(current.fields.ESCVotum))

This is really cumbersome and leads to some really long formulas, but it works.