In GoZyncMobile, find the script "Cache Fields On Layouts (LayoutName; LayoutTableName)". After the first three If() statements you'll see a line where we set the variable $FileName. Replace that line with the two lines shown in blue below:
The second line you can probably read, but the calc for the first one can be copied from here:
- Code: Select all
// ------------ BEGIN EXECUTESQL BLOCK ------------
Let ( [
ReturnSub = "\n" ; // We need to swap out carriage returns in your results with a different character, so specify the character here. \n is the default.
SQLResult = ExecuteSQL (
// ------------ BEGIN QUERY ------------
"SELECT a.\"FileName\"
FROM \"TableOccurrences\" a
WHERE a.\"ExternalFileLayoutName\" = ?" ;
// ------------ END QUERY ------ ------
" " ; "|*|" ;
// ------------ BEGIN ARGUMENTS ------------
$LayoutName
// ------------ END ARGUMENTS ------------
) ] ;
// ------------ BEGIN CARIAGE RETURN SUBSTITUTIONS ------------
Substitute ( SQLResult ; [ ¶ ; ReturnSub ] ; [ "|*|" ; ¶ ] )
// ------------ END CARIAGE RETURN SUBSTITUTIONS ------------
)
In GoZyncHosted, the idea is the same but the script and calc are slightly different. Find the script "Get Fields { FileName } (LayoutName; LayoutTableName)". After the first three If() statements you'll again see a line where we set the variable $FileName. Replace that line with the same two lines shown in blue above, but for the first line's calc, use this:
- Code: Select all
// ------------ BEGIN EXECUTESQL BLOCK ------------
Let ( [
ReturnSub = "\n" ; // We need to swap out carriage returns in your results with a different character, so specify the character here. \n is the default.
SQLResult = ExecuteSQL (
// ------------ BEGIN QUERY ------------
"SELECT a.\"FileName_Hosted\"
FROM \"TableOccurences\" a
WHERE a.\"ExternalFileLayoutName_Hosted\" = ?" ;
// ------------ END QUERY ------ ------
" " ; "|*|" ;
// ------------ BEGIN ARGUMENTS ------------
$LayoutName
// ------------ END ARGUMENTS ------------
) ] ;
// ------------ BEGIN CARIAGE RETURN SUBSTITUTIONS ------------
Substitute ( SQLResult ; [ ¶ ; ReturnSub ] ; [ "|*|" ; ¶ ] )
// ------------ END CARIAGE RETURN SUBSTITUTIONS ------------
)
// Compliments of SeedCode… Cheers!
// ------------ END EXECUTESQL BLOCK ------------
That's it!