exploring SailForms Pro

1,889 views
Skip to first unread message

Tim Wallace

unread,
Jul 19, 2017, 10:03:25 PM7/19/17
to Sailforms Users
While exploring Sailforms Pros capabilities, I developed a few apps that might be of interest to others learning to use SF. Good luck - comments welcome! Tim
Calendar_Tutorial.sfg
School_System___Updated.sfg
Dual_Transactions___Updated.sfg
Email_SMS_Tutorials.sfg
Form_Layout_tutorial.sfg
GPS_tutorial_2.sfg
Help_Buttons_Tutorial_6.sfg
IF_command__Tutorial_2.sfg
Image_Tutorial_3.sfg
Multiple_Keys___Updated.sfg

MikeG

unread,
Jul 21, 2017, 11:38:43 AM7/21/17
to Sailforms Users
Hi Tim, thanks for posting your examples. Simple examples posted by other users (or simple explanations posted in this forum) are a good way of extending one's Sailforms understanding I think, sometimes highlighting things one did not even realise are possible.

I'll give you some minor comments on a few of your groups - I'll deal with them one group at a time.

First the Form Layout group ...

Your introduction implies (probably not intentionally) that Go To Form Layout always opens the target form with a blank/new entry. This is true only if there is no connection from the source form to the target form. If there is a connection the Go To ... opens the entry specified connection, and if you want a temporary connection you can precede your Go To ... with a Search Form command specifying the target entry.

Personally (this is just a personal preference, not a requirement) if I want to explicitly open a new entry I precede the Go To ... command by a Clear Form command to make it clear what I am wanting. This works even if there is a connection (i.e. it overrides the connection).

Finally, to swap the layout being used to display the current form entry you would be better off using the Show Form Layout command (rather than Go To ...) otherwise you will inadvertently create two distinct form entries.

Mike

MikeG

unread,
Jul 21, 2017, 11:53:30 AM7/21/17
to Sailforms Users
Now the GPS group ...

There seems to be a minor bug in the Distances form. The If Test command in the getcoord button references a field named Location (that does not exist). This should be field Gps1 I think.

Recently (June 15) I posted a response to another user (who wanted to calculate the distance between two GPS points) explaining how to extract numeric latitude and longitude from a GPS field. My method matched yours (use of indexOf and subString commands). The user responded that he successfully used the method to calculate distance, but unfortunately did not post the calculation - so I can't help you with that (but maybe there is someone else who could help!).

MikeG

unread,
Jul 21, 2017, 12:29:31 PM7/21/17
to Sailforms Users
Help Buttons group ...

I have used a similar method to display help information. Another method used by some users (well, at least one!) is to define help in multi-line labels with a separate form for each help item. Personally I dislike this alternative as it results in a potentially large number of forms. I suppose one could avoid form proliferation by using a single form with a different layout for each help item but I suspect that help editing could get messy.

However, there are a couple of points that potential users of your/my method should be made aware.

First, if the group is backed up and then loaded using the Load Group without Entries option then the help is list! (The multi-line label method does not suffer from this problem).

Second, I don't think you can at the moment totally avoid the inadvertent creation of entries in a menu form. Your suggestion of including a Clear Form command in each help button seemed a good one but if the user clicks on the Save and Return icon the result is a new blank Menu form entry. At least for a favourite form (often the case for a main menu form) the possibility of defining a custom menu has been requested, but we don't have that option at the moment.

.

davro

unread,
Jul 23, 2017, 2:32:51 AM7/23/17
to Sailforms Users
Hello..Here`s.the.file..Hope.this.helps.
Compute_Distance.sfg

MikeG

unread,
Jul 24, 2017, 10:53:50 AM7/24/17
to Sailforms Users
Thanks davro, I'll save that for future use.
Message has been deleted

David Chesworth

unread,
Jul 24, 2017, 6:26:52 PM7/24/17
to Sailforms Users
Just to let you know your email form does not send anything, but the email address over to yahoo mail app.
Nice idea but useless if using yahoo mail

Your sms form just sends sms to sms app does not actually send an sms

Message has been deleted

David Chesworth

unread,
Jul 24, 2017, 6:31:31 PM7/24/17
to Sailforms Users

MikeG

unread,
Jul 25, 2017, 5:08:51 AM7/25/17
to Sailforms Users
Android specifies various interfaces (URIs) that allow app communication, for Email, SMS and Calendar for example. It is these URIs used in Tim's examples.

The URIs do not complete the final action, but allow the applicable data to be passed to an appropriate app. So the SMS behaves as expected by Android - an SMS app is invoked allowing the user to finally confirm the sending of the message.

The Email URI should operate similarly but, in my limited experience, many Email apps do not completely implement the URI. Gmail seems OK (checked on a Google Nexus and Samsung Galaxy Tab tablet), but typeApp (checked on Nexus) and the Samsung Email app both seem to accept the target Email address but not the Subject and Body fields. From what you report David, the same appears to be true of the Yahoo mail app. I think we need to blame the email apps for this problem (i.e. for not completely implementing the URI).

There is a similar problem (as noted by Tim in the Calendar example) of Calendar apps not implementing start and end time or duration.

Mike


David Chesworth

unread,
Jul 25, 2017, 5:41:21 AM7/25/17
to Sailforms Users
Do like the help file method applied here.  Would be nice if you could have predefined buttons for help so you don't have to input the formula for linking every time, for exta buttons .  What we need is a way to protect the help data in these fields so that when a user creates a new database from a template using the command no records the data doesn't get wiped. Probably a request feature for chris to think about.





   

David Chesworth

unread,
Jul 25, 2017, 5:42:56 AM7/25/17
to Sailforms Users
its strange that some apps work fine sending information to yahoo mail app but sailforms has a problem.  Could mean that there are other methods that android can use.  maybe Chris can investigate this.

David Chesworth

unread,
Jul 25, 2017, 1:26:30 PM7/25/17
to Sailforms Users
Something wrong with help example database when adding more buttons the added new button foes not show on form but show only in editing mode. Is this a bug or a sailforms problem

MikeG

unread,
Jul 25, 2017, 2:23:22 PM7/25/17
to Sailforms Users
David, did you add the button to the layout matching your phone/tablet screen size (i.e. the one highlighted blue in Edit Form)?

When a button (or any other field type) is added to a layout it is made visible ONLY on that layout. To make it visible on other layouts you need in form edit to go in turn to each layout where you want it to appear, select Show Hidden Fields and mark the required fields, then move them to the required place on the layout.

If you have created a layout for a each of several different screen sizes this can be a nuisance. For a significant edit it can be easiest to delete all layouts except those that apply to your device, do the edit, then recreate the layouts fir other screen size.

Mike

David Chesworth

unread,
Jul 25, 2017, 4:55:47 PM7/25/17
to Sailforms Users
Thanks Mike seems a bit silly having to enter for each layout wouldn't it be easier to say what layouts you want to use what you've just created rather than create several different layouts each time.

David Chesworth

unread,
Jul 25, 2017, 4:56:45 PM7/25/17
to Sailforms Users
I've just changed to a Samsung and am getting used to not using the HTC layout

Jean-Charles Pouplard

unread,
Sep 7, 2017, 5:36:53 AM9/7/17
to Sailforms Users
Hello,

  I've just downloaded these very valuable examples and learnt a lot buy studying them. Just one question: Email SMS tutorial seems to be "broken" because when I try to send a mail, it opens Inbox but does not fill the subjet and body parts ... (just like if parameters of the intent - that is, after "?" - were not taken into account). Is there a problem with intent parameters (as I have the same issues when playing with GPS through the "geo:" intent) ?

Regards

  Jean-Charles

MikeG

unread,
Sep 7, 2017, 9:31:12 AM9/7/17
to Sailforms Users
See my earlier post in this topic on this very subject. I quote the critical part here ...

"... but, in my limited experience, many Email apps do not completely implement the URI.  Gmail seems OK (checked on a Google Nexus and Samsung Galaxy Tab tablet), but typeApp (checked on Nexus) and the Samsung Email app both seem to accept the target Email address but not the Subject and Body fields.  From what you report ..., the same appears to be true of the Yahoo mail app.  I think we need to blame the email apps for this problem (i.e. for not completely implementing the URI)".

I've no experience of the equivalent for GPS so am unable to comment on that.

Mike

Jean-Charles Pouplard

unread,
Sep 7, 2017, 9:46:08 AM9/7/17
to Sailforms Users
hello Mike,

  Thanks for your answer. I was able to investigate deeper in the problem and it seems that name for extra some extra parameters has changed: for example, if you replace "subject=" by "android.intent.extra.SUBJECT=", then you can programmatically specify the subject of the eMail (I'm using Inbox). Not checked yet what to use to set up the content of the message but I think it works the same way.



  Jean-Charles

Jean-Charles Pouplard

unread,
Sep 7, 2017, 9:51:49 AM9/7/17
to Sailforms Users
... android.intent.extra.TEXT for the body of the message ...

MikeG

unread,
Sep 7, 2017, 3:42:07 PM9/7/17
to Sailforms Users
Thank you Jean-Charles, that's excellent

It worked OK for me with three different email apps. It seems gmail accepts both old and new methods, but other apps I've tried only accept your new method.

That problem has been an issue for some while.

Mike

David Chesworth

unread,
Sep 7, 2017, 5:52:41 PM9/7/17
to Sailforms Users
Mike did you get the body to go to work with Yahoo Mail as I could only get the subject to work

MikeG

unread,
Sep 8, 2017, 3:11:58 AM9/8/17
to Sailforms Users
Yes, both subject and body ok for me (but I'm not using yahoo mail).
Mike

David Chesworth

unread,
Sep 8, 2017, 9:58:56 AM9/8/17
to Sailforms Users
What I tend fid you use for body

MikeG

unread,
Sep 8, 2017, 11:08:13 AM9/8/17
to Sailforms Users
I used android.intent.extra.TEXT, as suggested by Jean-Charles.
Mike

David Chesworth

unread,
Sep 8, 2017, 4:34:03 PM9/8/17
to Sailforms Users
That does not work on yahoo mail however his subject intent did strange

MikeG

unread,
Sep 9, 2017, 6:08:44 AM9/9/17
to Sailforms Users
Hello David,
I was surprised that yahoo mail would not work when other apps seem OK so I loaded the yahoo app (an irritating procedure needing registration with yahoo) and tried it out.

All worked perfectly for me so I suspect you have a spelling error or similar in your intent data.

I've attached my test form for you.
Mike

Email_V2_Test.sfg

David Chesworth

unread,
Sep 10, 2017, 1:55:38 AM9/10/17
to Sailforms Users
Thanks found out why it didn't work I simply copied and pasted the intent instead of writing it. Must be a Sailforms copy bug

Donalt

unread,
Sep 20, 2020, 9:40:20 AM9/20/20
to Sailforms Users

Hallo
How is the Syntax to send an attchment (file) ???

gi.ma...@gmail.com

unread,
Jan 4, 2023, 6:53:06 AM1/4/23
to Sailforms Users
Can someone give me an example where there is a procedure to make the sum total of numeric records of a field. Thank you

MikeG

unread,
Jan 4, 2023, 4:27:51 PM1/4/23
to Sailforms Users
I have put my reply in the thread in which you originally raised this question, so I've put my answer there so that this topic does not wander off into new territory.
Reply all
Reply to author
Forward
0 new messages