[Sticky] INDEX: list of Proclaim Maths functions
TOBASE64
convert string variable or field to base64 encoded string
vtext = "hello"
v64=TOBASE(vtext)
message ("base64 encoded string: ", v64)
21-1-22 corresponding decoder is NOT
FROMBASE64
as this serves some other purpose, but is
DECODE-BASE64-STRING
available in 3.5.0.02 and 3.4.1.23
vtext = "hello"
v64=TOBASE(vtext)
message ("base64 encoded string: ", v64)
21-1-22 corresponding decoder is NOT
FROMBASE64
as this serves some other purpose, but is
DECODE-BASE64-STRING
available in 3.5.0.02 and 3.4.1.23
Re: CALL-ACTION
Hi Stevesteve wrote:CALL-ACTION (caseref,"Linked Action Code")
as per CALL-MATHS, but replace with the name of a linked action
What's the best use for the CALL-ACTION prompt?
Are you running this from within a maths field in DB Maint or can it be run from an existing Linked Action?
Cheers
Adam
Re: CALL-ACTION
Hi Adam,
you can run it from anywhere - maths or another linked action, but it's only really useful for a very narrow set of circumstances.
This feature is good for 'caseless' autoroutines. The code for the RTA/ELPL portal is a good example.
Say you have an autoroutine that calls an external webservice, that returns a list of cases that need updating.
You can then cycle through each case using WEBNEXT and call a linked action on each case returned, using the CALL-ACTION command.
Using it in pretty much any other scenario has risks - no case locking is performed by CALL-ACTION,so you have to manage this yourself. There is no sanity checking of the "linked action code", and the linked action is not included in search results when you click the button in Workflow maintenance to see where a specific linked action is in use (you have to perform a text search in Maths Search utility).
If you have some code that you might want to run as a maths field or a linked action, then I am a fan of creating one Maths field in DB maintenance, then having your linked action simply containing "vrun={my maths field.Text}"
Hope this helps
you can run it from anywhere - maths or another linked action, but it's only really useful for a very narrow set of circumstances.
This feature is good for 'caseless' autoroutines. The code for the RTA/ELPL portal is a good example.
Say you have an autoroutine that calls an external webservice, that returns a list of cases that need updating.
You can then cycle through each case using WEBNEXT and call a linked action on each case returned, using the CALL-ACTION command.
Using it in pretty much any other scenario has risks - no case locking is performed by CALL-ACTION,so you have to manage this yourself. There is no sanity checking of the "linked action code", and the linked action is not included in search results when you click the button in Workflow maintenance to see where a specific linked action is in use (you have to perform a text search in Maths Search utility).
If you have some code that you might want to run as a maths field or a linked action, then I am a fan of creating one Maths field in DB maintenance, then having your linked action simply containing "vrun={my maths field.Text}"
Hope this helps
aph1804 wrote:Hi Stevesteve wrote:CALL-ACTION (caseref,"Linked Action Code")
as per CALL-MATHS, but replace with the name of a linked action
What's the best use for the CALL-ACTION prompt?
Are you running this from within a maths field in DB Maint or can it be run from an existing Linked Action?
Cheers
Adam
Re: CALL-ACTION
Hi Steve
Thanks for the info, proved a very useful command!
Thanks for the info, proved a very useful command!
steve wrote:Hi Adam,
you can run it from anywhere - maths or another linked action, but it's only really useful for a very narrow set of circumstances.
This feature is good for 'caseless' autoroutines. The code for the RTA/ELPL portal is a good example.
Say you have an autoroutine that calls an external webservice, that returns a list of cases that need updating.
You can then cycle through each case using WEBNEXT and call a linked action on each case returned, using the CALL-ACTION command.
Using it in pretty much any other scenario has risks - no case locking is performed by CALL-ACTION,so you have to manage this yourself. There is no sanity checking of the "linked action code", and the linked action is not included in search results when you click the button in Workflow maintenance to see where a specific linked action is in use (you have to perform a text search in Maths Search utility).
If you have some code that you might want to run as a maths field or a linked action, then I am a fan of creating one Maths field in DB maintenance, then having your linked action simply containing "vrun={my maths field.Text}"
Hope this helps
aph1804 wrote:Hi Stevesteve wrote:CALL-ACTION (caseref,"Linked Action Code")
as per CALL-MATHS, but replace with the name of a linked action
What's the best use for the CALL-ACTION prompt?
Are you running this from within a maths field in DB Maint or can it be run from an existing Linked Action?
Cheers
Adam
PUTDATA
PUTDATA( caseref , {field.type} , value )
allows you to update casedata from Proclaim Maths run from an Autoroutine with no case specified.
where:
caseref is a field or variable containing the case reference that you wish to put data into
{field.type} is the usual name and datatype of the field you wish to update
value is the value that you want to put into the field. Alpha fields need double "" surrounding the value.
Eclipse's code surrounds the PUTDATA with the usual locking commands
example something like
See also GETDATA, CALL-ACTION and CALL-MATHS, which together are useful for operating on cases called from an autoroutine where no SQL is specified (e.g. a list of cases returned from a WEBSERVICE call)
allows you to update casedata from Proclaim Maths run from an Autoroutine with no case specified.
where:
caseref is a field or variable containing the case reference that you wish to put data into
{field.type} is the usual name and datatype of the field you wish to update
value is the value that you want to put into the field. Alpha fields need double "" surrounding the value.
Eclipse's code surrounds the PUTDATA with the usual locking commands
example something like
Code: Select all
#select cases you wish to update
SQL("mysql01","")
#for each case, update with a value
SQLFIRST
vcase = return-value
while vcase <> "?" DO
OPEN (vcase, "LOCK")
UPDATE(vcase, "")
PUTDATA(vcase, {TPREF.Text},"ABC123")
UPDATE(vcase, "")
UPDATE(vcase, "UNLOCK")
SQLNEXT
vcase = return-value
END
-
- Posts: 543
- Joined: Fri Jun 15, 2012 12:44 pm
- Has thanked: 18 times
- Been thanked: 56 times
Re: [Sticky] list of Proclaim Maths functions
DELETE-FILE
Accepts single variable
Example of use - during importing of documents using Incoming Mail phrase, supply the file path, Proclaim sucks in the document then perform a COPY-FILE to move document into a processed directory and then DELETE-FILE on original document.
I.e:
Accepts single variable
Code: Select all
DELETE-FILE( vPath )
I.e:
Code: Select all
COPY-FILE( vPath , vNewPath )
DELETE-FILE( vPath )
-
- Site Admin
- Posts: 55
- Joined: Wed Nov 30, 2011 9:37 pm
- Has thanked: 1 time
- Been thanked: 4 times
Re: [Sticky] list of Proclaim Maths functions
Thanks revellbikes! Added to the indexrevellbikes wrote:DELETE-FILE
MODULO or MOD
MODULO or MOD
returns the the remainder after division of one number by another (sometimes called modulus).
syntax
where:
variable = a Proclaim maths variable
x = dividend
y = divisor
the variable would therefore be set to the remainder left when dividing x by y
EXAMPLE:
returns the the remainder after division of one number by another (sometimes called modulus).
syntax
Code: Select all
variable = x MODULO y
variable = a Proclaim maths variable
x = dividend
y = divisor
the variable would therefore be set to the remainder left when dividing x by y
EXAMPLE:
Code: Select all
#get the YEAR portion of today's date, divide by 4 and look at the remainder:
vmod = YEAR(TODAY) MODULO 4
if vmod = 0 then
message ("Leap Year")
#store in my new Number field
put (366, {days in this year.Number})
else
message ("Not a Leap Year")
put (365, {days in this year.Number})
end
Re: [Sticky] INDEX: list of Proclaim Maths functions
Here's a few more that aren't in the original list.
Some are only available with latest V3.3.4 of Proclaim:
ACCOUNTS-UPDATE
ADVCONFLICTCHECK
ARCHIVE
CALENDAR-ENTRY
CDH-REFRESHVIEW
CHR
FETCHCLOSE
FETCHDATA
FETCHERRORMSG
FETCHFIRST
FETCHLAST
FETCHNEXT
FETCHPREV
FETCHQUERY
GUID
INSERT
MD5-DIGEST
NO-REDISPLAY
NO-UPDATE
PUTACCOUNTS
SET-GLOBAL-VARIABLE
SHA1-DIGEST
TABLEAMEND
TABLECANCEL
TABLECLEAR
TABLECOPY
TABLECOUNT
TABLECREATE
TABLEDELETE
TABLEFIRST
TABLEGETCURRENT
TABLELAST
TABLENEXT
TABLEPREVIOUS
TABLEREFRESHALL
TABLEREFRESHCURRENT
TABLEREFRESHSELECTED
TABLERESET
TABLESAVE
TABLESELECT
TABLESELECTCOUNT
TABLESETCURRENT
TABLETRUECOUNT
Some are only available with latest V3.3.4 of Proclaim:
ACCOUNTS-UPDATE
ADVCONFLICTCHECK
ARCHIVE
CALENDAR-ENTRY
CDH-REFRESHVIEW
CHR
FETCHCLOSE
FETCHDATA
FETCHERRORMSG
FETCHFIRST
FETCHLAST
FETCHNEXT
FETCHPREV
FETCHQUERY
GUID
INSERT
MD5-DIGEST
NO-REDISPLAY
NO-UPDATE
PUTACCOUNTS
SET-GLOBAL-VARIABLE
SHA1-DIGEST
TABLEAMEND
TABLECANCEL
TABLECLEAR
TABLECOPY
TABLECOUNT
TABLECREATE
TABLEDELETE
TABLEFIRST
TABLEGETCURRENT
TABLELAST
TABLENEXT
TABLEPREVIOUS
TABLEREFRESHALL
TABLEREFRESHCURRENT
TABLEREFRESHSELECTED
TABLERESET
TABLESAVE
TABLESELECT
TABLESELECTCOUNT
TABLESETCURRENT
TABLETRUECOUNT
-
- Site Admin
- Posts: 55
- Joined: Wed Nov 30, 2011 9:37 pm
- Has thanked: 1 time
- Been thanked: 4 times
Re: [Sticky] INDEX: list of Proclaim Maths functions
Thanks John for adding these. I have updated the master list.