[Mobile] Database and other questions

[Mobile] Database and other questions

  

Hi, I'm currently using Outsystems 10 to create my Mobile app, and during my experience with the platform I've collected a set of questions to ask here. Let's hope I remember all of them. Here it goes:


1. Why do I have to empty the database before importing external data into an entity (Excel file, for example)? Let's say that my app is about Cinema. If I want to update my movie list, I have to erase all my movies first, and then import the updated Excel. During this process my users may notice the absense of movies. Please correct me if I'm wrong.


2. What's the easiest way to clean a big table from the database? I've created a button that executes a for cycle, but it only seems to remove like 20 table entries each time I press it. This gets annoying with 1000+ table entries.


3. If I release my app to the Play Store, do I have to do anything else to keep my database updated besides importing the excel file into the entities and doing the 1-click publish?


4. I can't find the SQL Query widget in this mobile platform of Outsystems 10, is it available?


5. Is it possible to send emails with this mobile platform?


Thanks!

Solution

Hi Henrique,

Thank you for experimenting the product!

Here are the answers to your questions:

1. It's not mandatory that you delete existing data, it all comes down to the type of data you're importing. If data being imported contains an attribute that let's you know it it already exists or was updated then you could include additional logic in your synchronization to insert new rows or update existing ones preventing the need for a full delete. However, if it's not possible to understand, from looking at data, if it already exists in the database then all existing rows should be deleted first which may lead to scenarios where users have access to a partial view of data.

2. It's weird if it removed only 20 entries at the time, I would advice you to check if the aggregates has a maximum number of records set. Probably the best way for you to clean a big table is like so: https://www.screencast.com/t/shGyqmjilt. This would solve your problem independently of the number of maximum records number set in the aggregate.

3. No, that will suffice. The server database will contain the new data which will be ready to be consumed by the application. Another approach could be to build a web application where you may upload the excel file and add the information to the database. This would get you around the need to publish the app.

4. It is available for server-side actions only.

5. You can send emails, but you need to design it in a Web App Module with an public action to send it and then reference that action in your Mobile Module

If anything is still unclear please let me know!

Regards,

Ricardo Neto

Solution

Thanks, that really helped!

Ricardo Neto wrote:

5. You can send emails, but you need to design it in a Web App Module with an public action to send it and then reference that action in your Mobile Module

Ricardo, sorry come up with this again, but how exactly do I do this?

Is it available in the free version of Outsystems?


Hi Henrique,

Sending e-mails is possible in your OutSystems Personal Environment, however, it requires some configuration in order to send e-mails through an external SMTP server. You can find information on how to do this here.

In terms of creating the logic to send an e-mail, you'll need to do this via a Web Application by using the e-mail screen and the Send Email action.

If you need further assistance just let us know!


Regards,

Ricardo Neto