How to create/find the right schema and .i file?

Posted by cjohnston on 28-May-2013 17:31

Hi,

In the 4th TechTips video, the narrater creates a new Business Entity as part of his mobile application project in PDSOE. I'm trying to do the same but I can't seem to find the .i file to select a schema from.

Any tips? Thanks

All Replies

Posted by egarcia on 29-May-2013 02:16

Hello,

Page 51 of the OpenEdge Development: Mobile Applications book has an example on how the include file looks like.

http://documentation.progress.com/output/OpenEdge112/oe112html/wwhelp/wwhimpl/js/html/wwhelp.htm#href=OpenEdge%20Mobile/Mobile%20Applications/dvmad_Simple_Mobile_App_Example.07.05.html

Here is the content of dsCustomer.i:


          
     
     
          


               
DEFINE TEMP-TABLE eCustomer NO-UNDO BEFORE-TABLE beCustomer
     FIELD CustNum AS INTEGER
     FIELD Name AS CHARACTER FORMAT "X(20)"
     FIELD Address AS CHARACTER

     FIELD Phone AS CHARACTER
     FIELD SalesRep AS CHARACTER
     FIELD Balance AS DECIMAL
     FIELD State AS CHAR
     FIELD numOrders AS INT
     INDEX CustNum IS UNIQUE PRIMARY CustNum
     INDEX Name NAME.



DEFINE DATASET dsCustomer
     FOR eCustomer.



You can access the documentation and download the book as a PDF from the following location:

- http://communities.progress.com/pcom/docs/DOC-107875

I hope this helps.

Posted by cjohnston on 03-Jun-2013 13:32

Thank you! I went through the simple mobile app example and this makes sense now.

I've run into another issue...

I've now created my own mobile app, which is almost identical to the example provided by Progress. The only thing I'm trying to do differently is read from the database at my company instead of the Sports2000 DB. When testing my app, the "failed to login" popup appears every time. After many comparisons between my app and the Progress example, I noticed what is likely the root of the problem, or at least close to the root: When I enter the value for my catalogURI (from my service Settings tab) into a web browser, it shows a "file not found" page. If I do the same for the working Progress example, the json file shows up in the web browser as it should. Any idea what this means?

Any help or tips would be great, thanks.

Posted by Anil Kumar on 03-Jun-2013 23:53

Hi Cameron,

I think 'Failed to Login' message is shown when wrong Javascript code is placed in the add event section (ie., 'To add an event to the page' section under 'Creating the mobile app' section in the documentation). Please modify the 'settings' value in the given javascript code with your own service name.

Can you also please make sure that the mobile service is published/deployed to OE Webserver properly. We might see "file not found" page if the service is not published properly to the OE Webserver (Tomcat server).

Hope this helps.

Thanks and Regards,

Anil Kumar.

Posted by cjohnston on 04-Jun-2013 10:15

Hi Anil,

Thanks for your reply. I already changed the value of settings in my JavaScript code to point to my settings service as you mentioned, so I don't see that being the problem. I will look into ensuring the service is deployed to the OE Webserver.

Cheers,

Cameron

This thread is closed