Forum Discussion

GeorgeBramhall2's avatar
GeorgeBramhall2
Qrew Cadet
5 years ago

Formula decipher

Can someone explain what this Rich Text Formula is doing?:
//URLRoot() & "db/" & [_DBID_PARAMETERS] & "?a=API_GenAddRecordForm&_fid_24=" & URLEncode ([Week key])& "&z=" & Rurl()

var text urlInitialize =
URLRoot() & "db/" & [_DBID_PARAMETERS]
& "?a=API_EditRecord"
& "&rid=5"
& "&_fid_24=" & URLEncode ([Week key])
& "&apptoken=" & [appToken]
& "&rdr=" & URLEncode(

URLRoot() & "db/" & [_DBID_WEEKLYPRODUCTSINVTY]
& "?a=API_RunImport&id=10"
& "&apptoken=" & [appToken]
& "&rdr=" & URLEncode(

URLRoot() & "db/" & [_DBID_WEEK]
& "?a=er&rid=" & [Week RID]
)
);
"<a class = 'Vibrant Primary' title = '' href='" & $urlInitialize & "'>Initialize&nbsp;Product&nbsp;Movements</a>"

------------------------------
George Bramhall
------------------------------
  • AustinK's avatar
    AustinK
    Qrew Commander
    What specifically are you wanting to know about it? It is hard to give a description of what it is doing exactly without knowing more about the fields, tables, and data that is contained in there.

    At a basic level it is editing a record in the [_DBID_PARAMETERS] table with a record id of 5 and inserting [Week key] into field 24. Then it runs a saved import with an ID of 10 on the [_DBID_WEEKLYPRODUCTSINVTY] table. You then end up on a record in edit mode on the [_DBID_WEEK] table , the record id will be whatever is recorded in [Week RID] on the table the button you are clicking is on/from.

    The _DBID_<insert table name> parts above may be different from the actual table names. You can find out what each table is called by going to the Advanced Settings for a table and it will be at the bottom of the page.
    • GeorgeBramhall1's avatar
      GeorgeBramhall1
      Qrew Member
      Great thanks, this is exactly the information that I was looking for.

      ------------------------------
      George Bramhall
      ------------------------------