Working With Calculation Flashcards

1
Q

In a calculation formula, what is the difference between using the operators “&”, “+”, and “and”?

A

Here are the differences:

a. “&” concatenates strings together.
i. Example: Students::First & “ “ & Students::Last b. The “+” symbol is used to add values together
i. Example: 4 + 5
c. The word “and” is used in logical functions
i. Example: if ( Get(CurrentDate) > Date ( 6;1;2018) and Students::Gender = “Male”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A developer built a recursive custom function called “CF_AddDots”:
Case ( numOfDots > 0 ;
CF_AddDots ( text & “.” ;
numOfDots - 1) ;
text )
What will this function return: CF_AddDots (“FileMaker” ; 3)?

A

CF_AddDots ( “FileMaker” ; 3 ) will return “FileMaker…”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

For the following calculations, write down the result.

a. Position ( “Fred Millstone” ; “e” ; 1 ; 2 )
b. Round ( 56.32 ; 1 )
c. FilterValues ( “Red¶Green¶Blue” ; “White¶Blue¶Red” )

A

The returned value of each calculation is:

a. Position ( “Fred Millstone” ; “e” ; 1 ; 2 ): 14
b. Round ( 56.32 ; 1 ): 56.3
c. FilterValues ( “Red¶Green¶Blue” ; “White¶Blue¶Red” ): “Red¶Blue”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Given the field Assignees that contains a list of four values, what is the difference between the results for MiddleValues (Assignees ; 2 ; 1) and GetValue (Assignees ; 2)?

A

The MiddleValues() function includes a carriage return after each value. GetValue () does not include the return character

a. MiddleValues (Assignees ; 2; 1 ) = ¶
b. GetValue (Assignees ; 2) =

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are some reasons for using a custom function?

A

A custom function might be created as a place to store often-used logic, such as finding the age of a person based on her birthday or cleaning up a phone number format. Rather than repeating the logic over and over, it is set up once and called wherever needed. Another kind of custom function, recursive functions, can be created. These functions perform complex tasks, such as parsing individual letters of a word into separate lines, and returning the result. This allows a developer to perform the calculation and get the result in one step.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Given this JSON data
$$json = “{\”Person":[{"Age":42, "First":"John","Last":"Smith"}, {"Ag
e":39,"First":"Jane","Last":"Jones"}]}”
What is the result of each of these functions?
a. JSONFormatElements ( $$json )
b. JSONListValues ( $$json ; “Person” )
c. JSONGetElement ( $$json ; “Person[1].Last” )

A
The returned value of each calculation is
a. Human readable JSON:
{
"Person" : [
{
"Age" : 42,
             "First" : "John",
             "Last" : "Smith"
        },
{
"Age" : 39,
             "First" : "Jane",
             "Last" : "Jones"
        }
] }
b. A return delimited list of each element in the Person array: {“Age”:42,”First”:”John”,”Last”:”Smith”} {“Age”:39,”First”:”Jane”,”Last”:”Jones”}
c. The Last element from the second item in the array (JSON arrays are 0 based): Jones
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
What will the function below return?
While ( [
i=1 ;
text = “FileMaker” ];
i<4 ; [
text = text &amp; “.” ; i=i+ 1
];
text
)
A

The function will return “FileMaker…”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly