In Flexi Layouts we create, Static Text element is searched using 'SearchTextFromDB' parameter. One sample argument for 'kwVendorText' field is as follows:
SearchTextFromDB: "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=User_kwVendorSpecific;Data Source=LOCALSERVER\\SQLEXPRESS", "SELECT vendorname FROM kw_1Test WHERE layout_name = 'Andis' ORDER BY ord DESC;", 10000;
In the argument above, we want to replace layout_name being referred ('Andis') to the text written in "Name" field in 'General' tab of Flexi Layout Properties (functioning similar to "layout_name = currentLayout" instead of 'layout_name = 'Andis'). The objective is to avoid replacing vendor names (i.e. 'Andis') in 'SearchTextFromDB' for each search element in new layouts, and instead allowing argument refer to whatever the current Flexi Layout Name is. This way, even though Flexi Layout name is changed, vendor names in arguments are not modified and 'SearchTextFromDB' simply searches external database according to the new Flexi Layout name.
We essentially are trying to access to Name property of a Flexi Layout and insert it into SQL query in an element's advanced pre-search relations block.
How can we achieve this? Is there a variable in Flexi Layout Studio we can insert in argument syntax? (We did not find any information in Help file, in regards to accessing Name property of Flexi Layout) Can we use Global Constants to create a constant that refers to the name of current layout?
I have also attached an image demonstrating what we would like to achieve.
Thank you in advance for your help.