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] Stop adding a record to db in WF Maintain

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Stop adding a record to db in WF Maintain
 Login/Join
 
Platinum Member
posted
I have created a small intake form using WF maintain.Implemented the Add functionality.
I have a submit Button in the Form and when i click the submit button i check for a particular Editbox.If it is null how can i stop the data being updated in db.
I have given validation error message using js function ,but where do i terminate the db connection.

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


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 229 | Location: MI | Registered: September 13, 2017Report This Post
Master
posted Hide Post
In this example I have a field on my form called Field1 and an Include case called AddData.

When the user presses the button I kick off this JavaScript


function OnButton1_Click ( ) {
var xxx = Form1.Field1_Edit.value;
if (xxx=='')
{
alert("Field cannot be blank")
}
else
{
IWCTrigger("AddData");

}
}


In your AddData case have a COMMIT after the Include statement. I hope this helps.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Platinum Member
posted Hide Post
@Maintain Wizard
Just commit as a word is enough.?
This is my maintain code.
MAINTAIN FILE template


$$Declarations


Case Top
Infer template.TEMPLATE.ID into demo2;
Winform Show Form1;
EndCase


Case Add
Include template.TEMPLATE.ID from demo2 ;
Stack clear demo2 ;


EndCase
END  

Can you give that commit syntax?
Thanks


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 229 | Location: MI | Registered: September 13, 2017Report This Post
Master
posted Hide Post
Yes! Commit saves the data to the database and closes the connection. I placed it in your ADD case.


MAINTAIN FILE template
$$Declarations
Case Top
Infer template.TEMPLATE.ID into demo2;
Winform Show Form1;
EndCase

Case Add
Include template.TEMPLATE.ID from demo2 ;
Stack clear demo2 ;
COMMIT

EndCase
END

Let me know if you have any questions!
Mark Derwin
Mark_Derwin@IBI.com
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Platinum Member
posted Hide Post
Appreciate the help.I started using Maintain from last week onwards. I am getting help from people like you.


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 229 | Location: MI | Registered: September 13, 2017Report This Post
Platinum Member
posted Hide Post
When IWCTrigger("AddData") is encountered data gets added in database?
In my case i have added a task in Task/Animation which runs the case Add.
So eventhough i write js the task executes and null data is going inside the database.


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 229 | Location: MI | Registered: September 13, 2017Report This Post
Platinum Member
posted Hide Post
I fixed it.
I gave the task execution inside the validation loop.
If(field is null)
alert("Please select");
else
task execution.

Working perfectly.


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 229 | Location: MI | Registered: September 13, 2017Report 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] Stop adding a record to db in WF Maintain

Copyright © 1996-2020 Information Builders