Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Getting the last three positions of a field in InfoAssist

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Getting the last three positions of a field in InfoAssist
 Login/Join
 
Platinum Member
posted
Hello

we have a field, 16 characters long. It can be filled with:
1. 8 characters and 8 spaces ('ABCDEFGH ')
2. 10 characters and 6 spaces ('ABCDEFGHIJ ')
3. 13 characters and 3 spaces ('ABCDEFGHIJKLM ')

etc etc. All combinations are possible whereby the spaces are always trailing.

The user wants to have the last three filled positons of the field.
So for 1. that is FGH, for 2. HIJ and for 3. KLM

This has to be done in the DEFINE box in InfoAssist.
I tried substring, arglen, rjust, trim but ir doesn't work. I need a combination of two functions.

Can I embed two functions in the DEFINE box for one DEFINE??

Regards
Ron

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS AppStudio 8.2.04
WebFocus Datamanagement Console 8.1M
DMC
 
Posts: 115 | Registered: August 29, 2014Report This Post
Virtuoso
posted Hide Post
You can combine as many function as you want until you do respect each function element's type and format.
Sample
N_FLD /A20V = LJUST(20, (TRIMV('B', MyFld, 20, ' ', 1, 'A20V'), 'A20V');

Or you create multiple DEFINEd fields and reuse them in another DEFINEd field
T_FLD /A20V = TRIMV('B', MyFld, 20, ' ', 1, 'A20V');
L_FLD /A20V = LJUST(20, T_FLD, 'A20V');


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
Hai all

I wanted to do this in one DEFINE.
In the end with your tips I succeeded.

SUBSTRING(FIELD_A,CHAR_LENGTH ( RTRIM(FIELD_A)) - 2, 3)

The simplified character functions helped me out

Thanks to you guys

Regards
Ron


WebFOCUS AppStudio 8.2.04
WebFocus Datamanagement Console 8.1M
DMC
 
Posts: 115 | Registered: August 29, 2014Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Getting the last three positions of a field in InfoAssist

Copyright © 1996-2020 Information Builders