Normal Topic Move Text to History Field Button (Read 3179 times)
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
Move Text to History Field Button
Oct 17th, 2016 at 1:50am
Print Post Print Post  
This is a cool little button I designed that moves whatever text you have in one field to a history field as a line item.

If you already have text in the history field, it just adds (text from other field) as a line item at the top in descending order. (Newest at the Top)

It also removes the text you just added from the original field.

I'm not a programmer, so I'm definitely open to suggestions or critiques.

Note:

Work = Text Box

History = Text Box

Code
Select All
var vWork as String
var vHistory as String
var vUpdate as String

vWork = Work
vHistory = History
vUpdate = vWork + @NewLine() + vHistory

If(History < 1)
{

FormFieldValue(@Layout + ":(update)", "History", 0, vUpdate)
Work = " "

}
else
{

History = @Replace(History, vHistory, vUpdate)
Work = " "

} 

  
Back to top
 
IP Logged