Sending HTML Email?

2017-11-16 Thread bob.miller--- via 4D_Tech
Hi All,

I've sent a lot of email generated by 4D over the years, but it is time to 
up the game and send crisper looking stuff.  So I've been playing with 
sending HTML.

The problem is that when the email arrives, it displays all the tags in 
the mail client!  For some reason, the mail client (I've tried several) 
doesn't "know" that the email is to be displayed in HTML.  Other emails 
are displayed in HTML (just not mine), so I know it is not a mail client 
setting to render all email as text only.

I've tried a variety of headers (I've omitted the greater than and less 
than signs so it doesn't mess things up on your display)

html xmlns="http://www.w3.org/1999/xhtml;

meta content="text/html;charset=3DUTF-8" http-equiv="Content-Type" /

and even plain and simple old:

html


All produce email that when saved as a text file and viewed in a browser, 
look great.  But when they are received by an email client, look 
like...raw HTML code.

What to do?

Or should I forget about it and use an API to some service?

many thanks,


Bob Miller
Chomerics, a division of Parker Hannifin Corporation



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: What happened to 4D documentation in R releases?

2017-10-06 Thread bob.miller--- via 4D_Tech
Yes, v16 brings a somewhat frustrating "new" approach to documentation. In 
fact, I postponed looking at v16 until there were PDF docs, which were not 
released until several _months_ after v16 came out (there were html docs, 
but no PDF docs). 

I am also frustrated by how the documentation has been handled with the 
R-releases; if you look at the website right now, there are pages (I won't 
call it documentation) for "What's New" for both v16R5beta and v16r4, 
which is great - but there's nothing on v16r3 and v16r2.  Why would I be 
interested in those docs, since those features are included in r4? Because 
the Upgrade manual is so useful to describe the incremental changes in 
that release.  Without it, I have to really dig to find out what I might 
have missed in r2, r3. 

Richard brings up another frustration: Starting with v16 r-releases, there 
really have not been Upgrade manuals, there have been "What's New" pages, 
and I agree - this is NOT documentation.  While one can jump into the 
documentation guided by the "What's New" page, just try to find "What's 
New" page for v16r2 and v16r3...they just aren't there anymore.

I respecfully request that when any version, R-release or not, is 
released, that an Upgrade manual is released in tandem that describes each 
new feature in detail -eg. "real" documentation" - and that these Upgrade 
manuals remain posted in perpetuity just like they have been for pre-v16 
versions.

My $.02 -

Bob Miller
Chomerics, a division of Parker Hannifin Corporation



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Object fields (Was: Re: QUERY BY ATTRIBUTE is slow af)

2017-09-13 Thread bob.miller--- via 4D_Tech
Along the lines of, "what is an appropriate use of an object field", I've 
been considering this:

We are a manufacturing company with lots of tools and lots of products. 
Each tool has various attributes, but each tool type has a different set 
of characteristics. 

Silly example that I hope everyone can follow: if the tool type is 
"screwdriver" then the attributes might be:

Tip Type (blade, Phillips, Torx, etc.)
Tip Size (#1 or #2)
Shank length (in mm)
Handle diameter (in mm)


...If the tool type, however, is "hammer" then the attributes might be:

Head type (claw, peen, sledge, etc.)
Claw shape
Head weight
Shank material
Shank length
Grip Type
...and many more


Common to all tools, regardless of tool type are attributes such as:

Tool ID
Tool Type - which determines the format and contents of the object field 
that contains the attributes
Storage Location
Purchase Date
Condition (good, fair, poor, unusable)
Status (ready to use, in use, lost)


90% of the time users want to enter a Tool ID to retrieve the Storage 
Location, Condition, and Status.  10% of the time they know the tool type 
but don't know the tool ID and want to query for a tool to do the job, 
using one or several attributes.  I've been thinking that because there 
are so many tool types and so many attribute "collections", an object 
field might be a good place to store the attribute data in name-value 
pairs.  This way I don't have to have a table with every single attribute 
name, which would be a problem because I don't know them in advance (users 
want to be able to specify the attributes themselves, along with the 
attribute value of course) and many tools do not share many attributes, so 
a big mostly-empty record would result if I used fields.

The object field on a record with Tool Type = "screwdriver" would contain 
attributes for a screwdriver, while the object field on a record with a 
different Tool Type would contain a different set of attributes.  A table 
for "Tool Type" would have one record for each tool type and could also 
use an object field to contain the attribute names, since this would be 
more handy than having multiple records for each tool type, one for each 
attribute name.  The normalized, relational model isn't really needed 
here, though of course it could be used.

An object field seems ideal for this kind of application, and 'Query by 
Attribute' certainly makes it possible.

There are always LOTS of ways to solve a problem, but do you agree that an 
object field is a good way to solve this one?  If it is a mediocre way to 
solve it, I'd like to hear your comments!


Bob Miller
Chomerics, a division of Parker Hannifin Corporation 



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

[Off] Remote backup

2017-09-12 Thread bob.miller--- via 4D_Tech
Hi Jeff,

This is a great idea, I had not thought of it.  Let me repeat it back to 
see if I have it:

[Server#1] Runs 4D Server that users are actively using.  Code in a loop 
on the 4D Server calls "New Log File" every 10 minutes.  Code in the loop 
then calls LEP to a script to transfer the last journal file to 
[Server#2].

[Server#2] Runs 4D Server that users aren't aware of.  Code in a loop on 
the 4D Server detects that a complete journal file has arrived (as it will 
every ten minutes, my uncertainty is how it knows the file transfer is 
complete) and integrates it using INTEGRATE MIRROR LOG FILE.  Code in the 
loop then calls LEP to a script to transfer this journal file to 
[Server#3].  4D Backup runs on this machine and sends its backup file to 
[Server#3]

[Server#3] This is a repository, nothing is actively running on it, it 
could be iCloud, Amazon S3, etc.


Do I have this basically correct?

Then some technical questions:

It would seem that Server#1 never runs 4D Backup, because any restoration 
would be done using Server#2.  Nevertheless, if Server#1 started up and 
somehow choked, a "normal" behavior would be to restore from backup and 
integrate the log file.  Since this behavior would be turned off, what is 
the procedure you use if Server #1 won't start?  Do you copy the mirror on 
Server #2 to Server#1?

How do you handle the timing, so that [Server#2] knows that the file 
transfer is complete and it is OK to integrate the log file?  Does 
[Server#1] somehow send a 'I'm Done' message to [Server#2] in your 
implementation?

What do you do if [Server#1] dies to now point users to [Server#2], 
assuming the Server application is a built application so that the server 
address and port number are built into the (built) 4D Client?

Many thanks!

Bob Miller
Chomerics, a division of Parker Hannifin Corporation



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Restricting a query

2017-07-31 Thread bob.miller--- via 4D_Tech
RE> I have a table which contains records for 10 different clients.
I'd like to give a client the ability to search the table for only his
records and not be able to see any of the other clients' records.

Is it possible to do this using the standard 4D Query editor by always
applying an additional search criteria eg clientID=xxx?

Or do I need to build my own custom query editor?
I'm using 4D 15.4.


Michael,

I *wish* you could use this with Views, but today Views only support SQL. 
Please vote for my feature request (when you open the request, you'll see 
a row of stars - click on the starts to give the request a 1-star, 2-star, 
or preferably 4-star rating).  This feature requests asks that since views 
are virtual tables, to allow all 4D query commands to point to the view as 
if it were a table:

http://forums.4d.com/Post/EN/13716634/1/13716635#13716635


In the meantime, you can certainly add a QUERY SELECTION line after 
calling the 4D query editor.

Best regards,


Bob Miller
Chomerics, a division of Parker Hannifin Corporation



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Someone help me out, how do you get good information out of 4D

2017-07-12 Thread bob.miller--- via 4D_Tech
RE> The people I meant to write to know perfectly well my history and what 
I'm talking about - and know that it's form a quarter of a century ago. 
(By now, virtually no one from those days
is even around.)

David,

Virtually no one?  Really?  Come back to the US for the next Summit and 
you'll see all of us  :)


Bob Miller
Chomerics, a division of Parker Hannifin Corporation



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Using a custom icon in Confirm dialogs

2017-06-22 Thread bob.miller--- via 4D_Tech
Hi Everyone,

Someplace I read that you can take an .ico file (icon) and place it 
somewhere so that when you build a 4D app, that icon is used instead of 
the 4D icon on the 'Confirm' dialog.

I had this working, then rebuilt my system and obviously things moved 
around, because now it doesn't work.  Worse, I can't find in any of my 
notes or in the KB what this technique was.

Does this ring a bell to anyone who can steer me in the right direction?

Many thanks,


Bob Miller
Chomerics, a division of Parker Hannifin Corporation



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Securing ODBC Connections?

2017-06-06 Thread bob.miller--- via 4D_Tech
Hi Everyone,

I've been digging through the docs and not finding answers to my 
questions, which might be under my nose, but I'd appreciate help:

> An outside application (non-4D; "real world" stuff) - needs to pull data 
from our 4D Server (Win, v15.x) via an ODBC connection.  I can see how to 
turn ODBC on, but it is not clear how the 4D password system works for 
authentication (how is the userid and password passed inside the SQL query 
from the outside system?)

> I don't quite get the concept of 'Schemas' - it appears that I need to 
put the tables I will allow access via ODBC into a Schema, but it is not 
clear what I need to do with the other tables (that should not be 
accessible via ODBC).

This is the source of confusion, from the 4D Design Ref (v15), talking 
abtout setting types of access to schemas:
"More specifically, if you only assign Read Only type access to one group 
this will not have any effect since this group as well as all the others 
will continue to benefit from Read/Write access (assigned to  
by default). In order to set a Read Only type access, you also need to 
configure the Read/Write access."

I"m not clear at all about why "this will not have any effect...")

> Ideally I'd like to create a view and only allow the ODBC connection to 
query on the view.  I'm not clear on how this works with the Schema idea.

Anyone have some experience they are willing to share?

I most appreciate it!

Bob Miller
Chomerics, a division of Parker Hannifin Corporation



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: USE DATABASE from 4D client

2017-05-30 Thread bob.miller--- via 4D_Tech
RE> rather activating the "execute on server" method property,
I would recommend using the REMOTE keyword:

http://doc.4d.com/4Dv15/4D/15/USE-DATABASE.300-2288124.en.html



I don't understand how this would make any difference; the REMOTE database 
would still be held open until AUTO_CLOSE was called, or the calling 
process ended - so the database would remain locked to other users.

How does REMOTE allow the database to remain open (so there is minimal 
overhead to call USE DATABASE) to other users?


Bob Miller
Chomerics, a division of Parker Hannifin Corporation


**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Query selection by example.

2017-05-18 Thread bob.miller--- via 4D_Tech
RE> Is there a way of doing a query by example, on an aleady queried 
selection
of records? I want to create a selection of records, based on some 
internal criterea,
and then present that selection, in the form of Query by Example, to the
user.

Sure, I use this method with great results (the argument is a pointer to 
the table you want to query, where there is already a current selection)

CREATE SET(vDefaultFile->;"TempSet")
QUERY BY EXAMPLE(vDefaultFile->;*)

If (OK=1)

If (Records in set("TempSet")>0)  //new 11/19/2014 - don't prompt 
to search in selection if there were no records in the selection

CREATE SET(vDefaultFile->;"ResultSet")
INTERSECTION("TempSet";"ResultSet";"ResultSet")
USE SET("ResultSet")
CLEAR SET("ResultSet")
Else 
  //do nothing
End if   //`records in set("TempSet")>0
End if //`OK=1 on Query by Example
CLEAR SET("TempSet")



Bob Miller
Chomerics, a division of Parker Hannifin Corporation




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

4D World Tour - Go!

2017-04-06 Thread bob.miller--- via 4D_Tech
Hi Everyone,

I'll pitch in here, too - I attended the World Tour in Chicago earlier 
this week (yeah, I live in Boston where it is also offered, but that's 
another story).  I was impressed with the amount of preparation the 4D 
team did for the tour, with many good examples on the USB key and good, 
practical presentations.

I got a lot out of the demo on the use of subforms and how they have their 
separate 'scope' - the idea of modular form design, reusing various bits 
by using subforms - is a game changer for me.

Also JPR's commentary on what's coming and what you should do now to get 
ready for it was illuminating: get on the CALL FORM and CALL worker 
bandwagon, sensibly prepare for 64 bit, start getting rid of interprocess 
variables and MODIFY RECORD, etc.  JPR always has good insights into what 
you should be doing now to make life better later.

The second day to me was worth the money with just the demo database that 
showed how to use objects to create user-created "fields".  There's a lot 
of new good stuff in this realm, such as being able to query within an 
objects contents and such.  If you are not using objects yet, or even if 
you are, this is a great day of learning.

So I can recommend from my own experience that your time will be well 
spent.  Go when it is in your area.  You get a USB key for each day that 
is loaded with stuff, including a 42 page "Moving to v16" manual written 
by JPR. 

Hope this helps some folks!


Bob Miler
Chomerics, a division of Parker Hannifin Corporation




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Host Structure in a component-Enhancing 4D Code-you really want to see this

2017-03-16 Thread bob.miller--- via 4D_Tech
Hi Nigel,

One word:  Niice!

How did you insert an event 'on object method close', when you added code 
to the button?


Bob Miller
Chomerics, a division of Parker Hannifin Corporation 




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: 4D Server - Not letting go of users

2017-03-16 Thread bob.miller--- via 4D_Tech
RE> If a client/user does a force quit (i.e. Task Manager)

Just yesterday I had a problem where we had some 'license count exceeded' 
messages - very rare - and I noticed that we had people who were logged in 
for days.  Some had force-quit and others had simply closed their remote 
desktop sessions, but 4D Server never released them.  This is with Windows 
v15r4.


Bob Miller
Chomerics, a division of Parker Hannifin Corporation




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Weird variable (non-)refresh issue

2017-03-15 Thread bob.miller--- via 4D_Tech
Hi Everyone,

I have a situation where I have a variable on an input form that I set 
programmatically immediately before opening a dialog window (using the 
"Plain Window" window type).  When I move the dialog to the side (to see 
the input form, now in the background), the variable still has its "old" 
value.

I know the variable is being set because I tried setting the variable 
value to the clipboard before opening the dialog (the new value gets 
there).  When the dialog is closed, the variable is updated with the new 
value.

I've tried throwing in a REDRAW(variablename) and even a DELAY 
PROCESS(Current process;60) - but neither has any effect.

I noticed that the same effect happens even when an ALERT is called 
instead of opening a dialog - the variable does not display its new value 
in the background.  All of this is in the same process, of course.  I've 
tried using process variable displayed on the form as well as an object 
without a variable name (using Object Get Pointer to set the value) - same 
results.

It is important that the screen properly show the "new" value in the input 
form so it is visible in the background when the dialog is open.

Any thoughts?  Anyone seen this?  How to get a window to refresh before 
opening another window?  I was quite surprised that even the Delay Process 
didn't do it

Many thanks!


Bob Miller
Chomerics, a division of Parker Hannifin Corporation




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Adding fields to tables using SQL

2017-03-02 Thread bob.miller--- via 4D_Tech


Hello,

I'm tired of the structure editor and how it requires you to add fields 
one at a time and how the field palette disappears each time 4D loses 
focus.  I created my own little "Field Adder"utility where I can specify a 
table, then drop a list of field names and data types from two rows in 
Excel into a listbox.  I then spin through it and do the following:
> Check if that field name exists in the table
> If not, create it using the specified datatype
> If an index is requested, add it, too.

This SQL works great (using Execute Immediate with this value as the 
parameter):

ALTER TABLE GlobalPricebook ADD TRAILING PB_LTPrefix01 VARCHAR (20)

The problem is that newly created fields do not have the attribute, "Map 
NULL values to blank values", so I still have to return to the structure 
to check this property.


I've tried this with SQL:

ALTER TABLE GlobalPricebook ADD TRAILING PB_LTPrefix01 VARCHAR (20) NOT 
NULL

...but this will fail, giving this error message:

// Begin Error Message
Failed to execute ALTER TABLE command.

Error code: 1058
Failed to execute ALTER TABLE command.
component: 'dbmg'
task -1, name: 'Application process'

Error code: 1808
Failed to execute ALTER TABLE command.
component: 'SQLS'
task -1, name: 'Application process'

1058 Cannot add field in table GlobalPricebook
1052 Cannot update definition of table GlobalPricebook
1118 Cannot set field to mandatory for table GlobalPricebook

// End Error Message



I've also tried this after creating the field:

ALTER TABLE GlobalPricebook MODIFY PB_LTPrefix01 ENABLE NOT NULL

...but this fails, too - the error is 'parsing error' after the '01' in 
the field name.


I don't understand why this is failing.  I'm also not 100% sure that NOT 
NULL gives me what I want, because in the SQL reference is says that 
"Reject Null value input" corresponds exactly to the NOT NULL attribute.

Is there a way to set this property programmatically?


Bob Miller 
Chomerics, a division of Parker Hannifin Corporation


**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Structure and Data File do not match

2017-02-23 Thread bob.miller--- via 4D_Tech
Hi Everyone,

During a recent upgrade where I created a compiled/merged app with 4D 
Server, when I deploy the new compiled/merged app I get this message:

The structure and data fiels to not correspond to each other.  The data 
file cannot be opened with the structure.

This is in v15r4, and I swear this brings back memories of the old WEDD 
resource, now long gone.  For the life of me I can't figure out what's 
going on.

> The 4D Developer I'm using is the same exact version and release as the 
4D Server I'm merging with
> I've done this hundreds of times to deploy to "Server A" and a few times 
already to a new "Server B" - this is happening on "Server B"
> The data file was created using the compiled/merged app when it was 
first deployed on "Server B"
> If I copy the data file from "Server B" to my developer machine, I get 
the same error.

I'm not aware of what ties a structure file to a data file and I've never 
seen this before.

Any ideas?

many thanks!!


Bob Miller
Chomerics, a division of Parker Hannifin Corporation




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Detecting field properties that can take nulls

2017-02-20 Thread bob.miller--- via 4D_Tech
Hello All,

In troubleshooting a recent problem, I found that I had inadvertently 
unchecked "Map NULL values to Blank values" on a field definition.  I'd 
like to scan the database to see if I may have made the same mistake for 
any other fields.

I'm coming up short on a way to do that using Get Field Properties.  I 
don't want to scan every record of every field of every table, all I want 
to do is find whether my structure definition is wrong.

I've also dug through the SQL reference, and I'm not seeing any way to see 
field attributes. 

Any ideas?

Many thanks -


Bob Miller
Chomerics, a division of Parker Hannifin Corporation



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: iNUG List "From" Change

2017-02-17 Thread bob.miller--- via 4D_Tech
Per Tim Penner > The new behavior you see is called munging the address

Wow, a new tech word!  Actually not new at all - the origin per Wikipedia 
is actually in 1958 at MIT.  Geez, where was I?

"Mung or munge is computer jargon for a series of potentially destructive 
or irrevocable changes to a piece of data or a file.  It is sometimes used 
for vague data transformation steps that are not yet clear to the speaker. 
 Common munging operations include removing punctuation or html tags, data 
parsing, filtering, and transformation."

https://en.wikipedia.org/wiki/Mung_(computer_term)

Hmmm...sounds like a counterrevolution to the guys who promote data 
quality...


Bob Miller
Chomerics, a division of Parker Hannifin Corporation




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**