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     Using a define to reformat a field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Using a define to reformat a field
 Login/Join
 
<Leah Bell>
posted
I am filtering on two fields but am receiving an error message when I try to run the report. The error says it is a problem with the format of the fields I am filtering on.
How do I reformat the two fields?
Would you create a Define and use the edit function to do this? If so, how do you pull in the new edited field from the define into the filter?
 
Report This Post
Platinum Member
posted Hide Post
Could you post a code example and version you are working with...? I use the Define/Edit all the time but there can be tricks especially when working with date fields.....

Maybe one of the guru's can offer assistance but some of us newbie's need more info.
 
Posts: 132 | Location: Kansas | Registered: November 12, 2003Report This Post
<Leah Bell>
posted
I am using WebFocus Developer Studio 52. I have been using report painter and the gui interface to create the report really and haven't actually been writing any code into it myself. But what I am trying to do is change the format of a date/timestamp field to the YYMD format. I was thinking that I might could change the format from the MDYY that it is in in the database to the above format using a define in the procedure pane and the edit function. I think that if I can accomplish this it will solve my problem I am having when trying to run the report with the filter on the above date. currently I am getting an error message about the format of the date in the field I am tryin to filter on. I guess I would be doing something like EDIT (<field name>, "YYMD")? I haven't been able to get it to work yet though. Also, once it is reformat properly do you know how to pull the defined filed into the filter. I don't see where I can pull that in in the where clause interface if it is a defined field.
 
Report This Post
Guru
posted Hide Post
Try using HDATE or HPART.

field2/SDfmt = HDATE (DTfield, format);
field2/Afmt = HPART (DTfield, 'unit', format);

I like HDATE the best because it needs less input values.
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Guru
posted Hide Post
Could you please show us the the exact filtering statements and the formats of the fields you are filtering on? You may not need to change the format of the fields you are testing.

Let us know.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report 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     Using a define to reformat a field

Copyright © 1996-2020 Information Builders