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] MAINTAIN - selection condition

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] MAINTAIN - selection condition
 Login/Join
 
Silver Member
posted
Hi,

I have an edit box - ebFirstName - in a Maintain form which is linked to a variable - first_name - which is defined as:
compute first_name/a20;

There is a search button on the form which will retrieve the data from the data source where the corresponding first name field contains the value entered in ebFirstName. If ebFirstName is null, then I would like to retrieve all the data.

My code for the data retrieval is:
infer ... into StkSearchList;
stack clear StkSearchList;
reposition print_search_view;
for all next print_search_view.PRINT_SEARCH_VIEW.APPLICANT_KEY into StkSearchList
where print_search_view.PRINT_SEARCH_VIEW.FIRST_NAME_UPCASE CONTAINS TRIM(first_name)

However, when I try to add:
or TRIM(first_name) EQ ''

It fails with FOC03645 error - WHERE clause syntax: POLISH expressions not yet supported.

I have to perform similar checks on other input fields, such as, last_name, ssn, etc. in the same where selection condition. Thus, it would be great to avoid having to code:
IF variable EQ '' then select everything else select with condition

Any suggestions as to how to handle this?

Thanks!
JL

This message has been edited. Last edited by: JL,


Year(s) of experience in WebFOCUS: 5+. Using WebFOCUS 7.7.03 on Windows platform with Oracle/SQL Server.
 
Posts: 41 | Registered: September 08, 2008Report This Post
Virtuoso
posted Hide Post
Two possible solutions that I can see:
1. Split it up in parts.
Load all the data from the database in memory, then do stack copy statements, possibly with the help of repeat loops.
2. The other solution is of course to write a table request that accepts the input fields and return the answer set filtered and all (EXEC tablereq FROM fields INTO stack). Depending on the size of your database table this may even be faster then having maintain do it.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Master
posted Hide Post
JL
Please test this example. Instead of using the TRIM function, use an A0. An A0 is an unlimited alpha that is as long as it needs to be.

MAINTAIN FILE MOVIES
COMPUTE MTITLE/A0 = 'ROOF'
INFER MOVIECODE INTO STKSEARCHLIST;
STACK CLEAR STKSEARCHLIST;
REPOSITION MOVIECODE
FOR ALL NEXT MOVIECODE INTO STKSEARCHLIST
WHERE TITLE CONTAINS MTITLE
TYPE "NUM RECORDS = <END

This code brings back two records while this code:

MAINTAIN FILE MOVIES
COMPUTE MTITLE/A0 = ''
INFER MOVIECODE INTO STKSEARCHLIST;
STACK CLEAR STKSEARCHLIST;
REPOSITION MOVIECODE
FOR ALL NEXT MOVIECODE INTO STKSEARCHLIST
WHERE TITLE CONTAINS MTITLE
TYPE "NUM RECORDS = <END

Returns all 60. Give it a try.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Silver Member
posted Hide Post
Thank you for the suggestions!

JL


Year(s) of experience in WebFOCUS: 5+. Using WebFOCUS 7.7.03 on Windows platform with Oracle/SQL Server.
 
Posts: 41 | Registered: September 08, 2008Report 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] MAINTAIN - selection condition

Copyright © 1996-2020 Information Builders