Forum

HomeHomeCoreCoreGeneralGeneralVariable FormattersVariable Formatters
Previous
 
Next
New Post
5/20/2010 12:09 PM
 

Can someone explain the syntax for using the new Formatters field on the Variables configuration screen? I've tried the normal syntax used for COALESCE and FORMAT but it doesn't seem to work.

New Post
5/30/2010 7:52 AM
 

I'm not sure about that field, but you can accomplish use of FORMAT and other tags by using Target Left and Target Right

Type: Form

Source Variable: frmMyDate

Target Left: [FORMAT,

Target Right: ,{0:d}]

as an example

New Post
6/30/2021 8:07 AM
 

I've tried every permutation I can think of and cannot get this to work with the Replace Formatter. Running DNN 9.7.2 and OWS 2.4.0.

Specifically, I'm trying to strip http:// from the beginning of URLs before inserting them into the table. Using variations of the following format:

    Target Left: '[FORMAT,
    Target Right: ,{REPLACE:http://,;}]'

It stores the entire string to the database table as:

    [FORMAT,"http://www.website.com",{REPLACE:http://,}]

If there's a better way to accomplish this I'd be happy to learn.

New Post
7/1/2021 6:48 PM
 

This is actually an easy solution.


Instead of specifying the variable type as FORM, use CUSTOM and then on SOURCE use the following:


[FORMAT,"[|Variable,F]",{REPLACE:"http://",""}]


Keep your target left/right to single quotes to protect against SQL injection.

Previous
 
Next
HomeHomeCoreCoreGeneralGeneralVariable FormattersVariable Formatters


 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seattle, WA • info@openwebstudio.com

Bookmark & Share Bookmark and Share