Working With Calculation Flashcards
In a calculation formula, what is the difference between using the operators “&”, “+”, and “and”?
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”)
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)?
CF_AddDots ( “FileMaker” ; 3 ) will return “FileMaker…”
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” )
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”
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)?
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) =
What are some reasons for using a custom function?
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.
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” )
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
What will the function below return? While ( [ i=1 ; text = “FileMaker” ]; i<4 ; [ text = text & “.” ; i=i+ 1 ]; text )
The function will return “FileMaker…”