Table as Default Value in a Rich Text Field

Is there a way to insert a basic table as the default value in a rich text field? I’d like to Insert a table with 8 columns and 5 rows with some default headers in the columns, and then allow the User to add additional rows as needed and add text to the table.

Subject: Table as Default Value in a Rich Text Field

I set up a special form and view with default RTF contents in it. Then, on your real form, put in a DBLookup as the default value.

@DbLookup(“”:“Nocache”;“”;“Lookup\RTF”;“Pricing Table”;“RTF_Value”)

Subject: RE: Table as Default Value in a Rich Text Field

Graham … THANKS for the reply … I can get your suggestion to work IF the field I’m doing the DBLookup on is TEXT, but I can’t get it to return the table if I point the DBLookup to the Rich Text Field. Am I missing something that will allow a DBLookup on the RichText?

Subject: RE: Table as Default Value in a Rich Text Field

Yes - your lookup form needs two fields - a Text title, which goes into the view and to which your DBLookup finds, and a RTF for the contents, which is actually returned from the lookup.

@DbLookup(“”:“Nocache”;“”;“Lookup\RTF”;“Pricing Table”;“RTF_Value”)

In this example, my text Title field has a value of “Pricing Table” which you would see in the view, and the field on the form that holds the empty table is “RTF_Value”.

Subject: RE: Table as Default Value in a Rich Text Field

Graham … GOT IT!!! Thanks a bunch!

Subject: RE: Table as Default Value in a Rich Text Field

A profile document works for this also, and is more efficient.

Subject: RE: Table as Default Value in a Rich Text Field

Yes, you could use Profile documents, but I prefer normal documents that the DB administrator can see in a view to maintain.

Subject: RE: Table as Default Value in a Rich Text Field

Here’s a very easy way to view and control all the profile documents in an application.

Subject: RE: Table as Default Value in a Rich Text Field

Andre … thanks for the response …

From what I see on Profile Documents, you can only use TEXT and not RichText … am I missing something?

Subject: RE: Table as Default Value in a Rich Text Field

If there’s something in our documentation that makes you think you can’t use rich text (or numbers, or dates, or whatever you like) in a profile document, please tell me where it is so that I can get it corrected.

The @DbLookup should work too – but don’t make a view column for the rich text field, because the column will be blank (you can’t use rich text in a view) and its name will mask the field you want (because the programmatic names of view columns are used in preference to the items in the document with the same name).

Subject: RE: Table as Default Value in a Rich Text Field

Andre … re: using only Text in a profile document, and not rich text … I was going by what the online documentation says for the @SetProfileField … *********************************************

@SetProfileField( profilename ; fieldname ; value ; uniqueKey )

Parameters: value … Text. The value to which you want to set the field.


is there some other way to set and retrieve a Rich Text field value other than SetProfileField and GetProifileField ??

Subject: RE: Table as Default Value in a Rich Text Field

@SetProfileField( profilename ; fieldname ; value ; uniqueKey )Parameters: value … Text. The value to which you want to set the field.

If this hasn’t been corrected, I’ll pass it on to the folks who manage the help. You can use a value of any datatype, including multivalues and rich text.

is there some other way to set and retrieve a Rich Text field value other than SetProfileField and GetProifileField ??

Certainly – you design a form with the same name as the profile document and use @Command([EditProfile]) to open it in edit mode.