Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


In both cases, you use getCondition to select which records to display to the user. getCondition is essentially the JSON equivalent of the fieldsOnConditionQuery or conditionQuery JavaScript statements.
Because getCondition displays a list to the user, it must have a filter key defined. You can define static filters or use IF statements to create conditional filters. Note that the following:

 

Code Block
\"action\":\"getcondition\",

is always followed by the following:

\"filter\":\ 

In

...

the

...

following

...

example

...

code,

...

getCondition

...

is

...

invoked

...

when

...

the

...

CALREF1

...

field

...

(Contact)

...

from

...

the

...

activity

...

is

...

selected.

...

If

...

the

...

CALREF2

...

field

...

(Account)

...

contains

...

data,

...

then

...

Contacts

...

(module

...

2)

...

related

...

to

...

that

...

account

...

are

...

displayed.

...

If

...

no

...

Account

...

is

...

selected,

...

then

...

the

...

ELSE

...

statement

...

returns

...

all

...

records

...

using

...

the

...

following:

...

Code Block
\"action\":\"getcondition\", \"filter\":\"\" .

...


If you'd prefer to have no records returned, use the following:

...


\"action\":\"getcondition\", \"filter\":\"1=2\"

...

 

The below example does mimic the default behavior of SwiftMEAP - to display all contacts related to an account.

...