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     [CASE OPENED]WF Maintain application linked to Webfocus procedure

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CASE OPENED]WF Maintain application linked to Webfocus procedure
 Login/Join
 
Platinum Member
posted
Hello,

I am working on creating a Webfocus Maintain application to add/update/delete records from a particular database - this application will be available to end-users to query the database for a certain Customer and then update/delete the record as well as Add a new customer/record to the database.

I have created a WF report (procedure) and a Maintain procedure to do this - also have all the forms in place for adding/updating/deleting records... Application works fine when I run the application...

Currently I have limited my master file to spit out only 100 records for testing so that I can see how Maintain works as well as to check if I can add/update/delete records..

My real test is to have the user input the customer number and based on that my webfocus procedure will spit out only those records into my Maintain HTML table where I can then select the record to update/delete... I can't get the report to prompt for the input-parameter... If I introduce the WHERE customer EQ &Cust_no then it just doesn't prompt ... Also, I have the ON TABLE PCHOLD line in my report so that Maintain reads my report output into it's HTML table.. I think that this line is maybe preventing the user-prompt, but if so then how would I do it?

Has anyone tried this before? If so, can you please help me out here?

Thanks in advance!

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


WF 7.7.03, Win 7
 
Posts: 127 | Registered: January 12, 2017Report This Post
Master
posted Hide Post
Nova
Do you need to have the user select the record from a report? We could easily create a form where the user enters the record value. We can then either pass that variable to the Table (received as &1) or just use Maintain Next with Where to retrieve the desired record.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Gold member
posted Hide Post
Good morning,

Are you executing the procedure from your maintain code? Or are you executing the maintain code from a procedure? Is your procedure a straight TABLE FILE or does it execute sql?

If you open your maintain code and the execute the procedure, here is an example of something similar I currently use.

Maintain Code
MAINTAIN FILE COURSEBYLOCATION

$$Declarations

Case Top
INFER coursebylocation. COURSEBYLOCATION. FacilityCode INTO StkCourse;

COMPUTE
FacilityCode/A4 = '';
CourseCode/A4 = '';

Winform Show Form1;

EndCase

CASE selectRecords
STACK CLEAR StkCourse

-*OPTION 1 –external procedure not needed to retrieve data
REPOSITION coursebylocation. COURSEBYLOCATION. FacilityCode
FOR ALL NEXT coursebylocation. COURSEBYLOCATION. FacilityCode INTO StkCourse
WHERE coursebylocation. COURSEBYLOCATION. FacilityCode = FacilityCode
AND coursebylocation. COURSEBYLOCATION. CourseCode = CourseCode

-*OPTION 2 – execute external procedure
EXEC GetCourseByLocation
FROM FacilityCode CourseCode
INTO StkSelectAttendance;
EndCase

END

The form has 2 input fields bound to FacilityCode and CourseCode and one button. The customer enters the correct codes and then clicks the button. The onClick event code is PERFORM selectRecords.

Focexec code – (my example executes a stored procedure)
-SET &FacilityCode = &1; (parameters passed to focexec are named &1, &2, etc. I set to a logical name for simplicity)
-SET &CourseCode = &2;

ENGINE SQLMSS END SESSION
-RUN
-* CREATE SQL SESSION
SET SQLENGINE = SQLMSS
ENGINE SQLMSS SET DEFAULT_CONNECTION ConnName;
ENGINE SQLMSS SET CONVERSION LONGCHAR ALPHA
END
-RUN
SQL SQLMSS
EX dbo.storedProcName '&FacilityCode', '&CourseCode’;
TABLE FILE SQLOUT
PRINT FacilityCode, FacilityName, EffectiveDate, ExpirationDate
ON TABLE HOLD AS HOLDRSLT
END
TABLE FILE HOLDRSLT
PRINT FacilityCode, FacilityName, EffectiveDate, ExpirationDate
ON TABLE PCHOLD
END


Deana


WebFOCUS 7.6.8 and 7.7.03; Windows Server 2003 R2 and Windows Server 2008 R2, respectively; Development environments - Windows Server 2003 R2 and Windows 7 Professional, respectively;
excel, html, pdf
 
Posts: 89 | Registered: March 19, 2011Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by Maintain Wizard:
Nova
Do you need to have the user select the record from a report? We could easily create a form where the user enters the record value. We can then either pass that variable to the Table (received as &1) or just use Maintain Next with Where to retrieve the desired record.

Mark


Hi Mark,

No I don't have to have a report as such, I just to create a user-input variable where the user inputs a customer or searches for a customer and then the result-set shows up in a tabular format, where they can then edit/delete the record.

I am not aware of Maintain Next with WHERE clause.. can you please post an example or sample code? or if it is mentioned in some manual, I can gladly go look for that.

Thanks!


WF 7.7.03, Win 7
 
Posts: 127 | Registered: January 12, 2017Report This Post
Master
posted Hide Post
Hi Nova
Send me a PM at Mark_Derwin@ibi.com and I will send you a simple search test.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 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     [CASE OPENED]WF Maintain application linked to Webfocus procedure

Copyright © 1996-2020 Information Builders