Forum Discussion

RamonaMorseman1's avatar
RamonaMorseman1
Qrew Member
7 years ago

Add text to an existing text field upon demand

We have an existing multi line text field and now have a need to add text on certain occasions when documenting in this field.  We need to be able to add this text multiple times without clearing the field. 

The field is called Field Changes Made and is used to document software changes.  Many times, but not always, the documentation has these same 4 headings but different details: Event, Condition, Action, Parameter.  We are looking for a way to auto populate the Field Changes Made text box with those headings when needed.  When these headings are used in documenting a change, they can be used multiple times on the same record so thinking a button might be a good way to add them but not sure of formula?

2 Replies

  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    I'd recommend using a child table, rather than one field with multiple 'headers'.

    And if you are going to go to the trouble of making a button to pre-populate the headers, you might as well have that button create the 4 child records.

    You would use the API_AddRecord call and then have a redirect to add another record;

    Variable One;

    var text URLONE = URLRoot() & "db/" & [Child_Table_DBID]
    & "?act=API_AddRecord
    & "&_fid_15=" & URLEncode("Header")
    & "&_fid_16=" & URLEncode([Related Parent])
    & "&apptoken=yourapptoken";


    Then have the redirects:
    $URLONE
    & "&rdr=" & URLEncode($URLTWO)
    & URLEncode("&rdr=" & URLEncode($URLTHREE))
    & URLEncode(URLEncode("&rdr=" & URLEncode($URLFOUR)))

    Its not glamorous, but it should get the job done, and if you ever needed to add more details, or another record, just repeat a fifth time.