In the recent app upgrade, blank column is showing up as "undefined". Before this upgrade, blank column is showing up as blank in a query. This is more desirable to me. Is there a way to display blank if the data of a column is blank.
In the recent app upgrade, blank column is showing up as "undefined". Before this upgrade, blank column is showing up as blank in a query. This is more desirable to me. Is there a way to display blank if the data of a column is blank.
Hi Wai,
Could you clarify what do you mean under column?
Sorry, I really meant fields in a table of a DB.
For example, table CUSTOMER has "name", "location","yearofmember"
If I have the following data in the DB:
Wai,CA,
John,PA,1998
Mary,VA,1990
Before the upgrade, in a grid mapped to this table, I will see:
Wai,CA,
John,PA,1998
Mary,VA,1990
After the upgrade, I see:
Wai,CA,undefined
John,PA,1998
Mary,VA,1990
To me, blank on the UI is more appropriate but I would imagine some people might find undefined to be useful. I would I achieve what was there before.
Hi Wai,
I tried this use case but have ""(empty) value in DB field after.
It seems you passing "undefined" value for this field
To debug it please open browser debugger on "net" tab and find your "update" service request. Then take a look on actual passed parameters.
Details: http://prntscr.com/5m1365/direct
Regards.
It is not so much about me passing value. I just have a query response map to a grid. This behavior happened before few months back. Data shows as undefined in a grid when the actual DB column is null. Then, the behavior changed. Null field represented as "" in a grid and now it changed again.
You could try this: usomc.org/mobileguide, click "Find Event Information", enter "elijah pak" as the name and search. You will see that all other information are represented as blank. This app was published about a month or two back.
Then try this: http://appery.io/app/mobile-frame?src...
You will see a bunch of undefined value because they are null.
Checked the response from the debugger, what I noticed the responses were the same between the old version and new version. null value fields are not even included in the response. Therefore, it seems that some other code had changed within appery.io library.
Hi Wai,
I tried your app and seems to be i can not reproduce your problem.
See details: http://prntscr.com/5m38ft/direct
Regards.
please try again. I added code in the response mapping to deal with it. I added: if(value === undefined){ return ''; }
So if you try it now, you will see the first column after the search showing up as undefined.
Hi Wai,
Thanks this time i've been able to see this problem.
But take a look on the response parameters: there is no "Date"(that you link to the component in mapping) field in response.
Details: http://prntscr.com/5mgi71/direct
Please specify do you have "Date" field in the "evententry" collection?
Regards.
Date and other fields in question have been included in my query and response. However, the way the appery.io library works is that blank entry will not be included as part of the response. This behavior has not been changed. If you examined the old version of the app which was published before the appery.io library update and the new version, you will see that both responses are the same. Therefore, only the library behavior has been changed. In the old library, undefined data is represented as blank while in the new library, undefined data is represented as undefined.
Hi Wai,
It was undeclared behavior. And was changed. Currently if you have not field in your response - it will be "undefined".
Thus you need to use code to recognize it(undefined value) and return value you need(for example empty string).
Regards.