If I have a layout 'ABC ENTRY' and I just want that I should get only the name 'ABC' by calculation, what type of functions and calculations will be used?
Sent from miPhone
EDIT: OOPs! I didn't get it all completed before send...
There are in fact many Text functions
But if I have 'ABC GHQ ENTRY'
and I just want to get the whole instead of ENTRY ?
Layout Names can be
1- ABC ENTRY
2- XYZ ABC Entry
3- GHQ ABC Entry
I just want to avoid the Entry and need to get the remaining ones and with the right, It is just returning the right most one
Have you looked at the Left() function? You could combine that with a check to make sure the layout name includes "ENTRY" (using the PatternCount() function), get the length of the layout name (using the Length() function), and then return the characters excluding the right-most 6 (" ENTRY").
However, it might be better to look at why the layout names are what they are, and why you need to strip off the "ENTRY" portion of the name. Sometimes looking at a level above the immediate problem can lead to better solutions.
That was my first thought too: Why?
Maybe is the real purpose to get the underlying layouttablename?!
It sounds like you want to abstract the logic for navigation. This technique is pretty common, where you might have a module like Contacts and have multiple layouts for different views, e.g. Contacts List, Contacts Entry, Contacts Read-only, Contacts Chart, etc.
The Companies module would have Companies List, Companies Entry, etc.
The key to success for a mechanism like this is consistency in naming. Your navigation script could be as simple as:
Set Variable [ $module ; GetValue ( Get ( ScriptParameter ) ; 1 ) ]Set Variable [ $view ; GetValue ( Get ( ScriptParameter ) ; 2 ) ]Go to Layout [ $module & " " & $view ; Animation: None ]
Set Variable [ $module ; GetValue ( Get ( ScriptParameter ) ; 1 ) ]
Set Variable [ $view ; GetValue ( Get ( ScriptParameter ) ; 2 ) ]
Go to Layout [ $module & " " & $view ; Animation: None ]
In this case the script expects the module and view to be passed to the script separated by carriage return. Use whatever parameter-passing method you like.
The key here is consistency.
let ( Name = get ( layoutName ) ;
LeftWords ( Name ; wordcount ( Name ) - 1 )
The space and case of the 'word' may need to be considered. See the other posts for additional questions.
Retrieving data ...