Discussion
HCL Technologies
IN
Last activity: 8 Oct 2015 6:57 EDT
Not able to insert data in pega database
Hi,
I am trying to save data in pega-database. I had done following things.
1. Created an activity in that pages and classes I had given both the pages i.e datapage and property page.
2. I mapped property with datapage by using set-property method.
3. Then, I called obj-save method.
4. I saved that activity and ran it.
It saves a null value but not the value coming from property page. and when I tried giving a hard code value in that set-property , It saves succesfully.
Please assist what changes should be made to make this work.
Thanks and Regards,
Mayur Nabeda
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Coforge DPA
GB
Hi ,
If you share the screen shot of the Activity you are using it will give more clarity of what are you doing.
One thing , if you dont hard code does the Page you are doing Obj-Save on has the value or not (means is the Property-Set happening correctly on the Page)?
Regards
HCL Technologies
IN
This one is for Pages and classes
--------------------------------------------------------------------------------------
This is for Obj-save method.
In that field of Properties value when I am trying to give hard code value,It will insert it. But when I try to give value as "FromForm.Name",It is inserting null value in database.
Thanks and Regards,
Mayur Nabeda
HCL Technologies
IN
Screenshots are attached.
HCL Technologies
IN
This one is for Pages and classes
HCL Technologies
IN
This is for Obj-save method.
In that field of Properties value when I am trying to give hard code value,It will insert it. But when I try to give value as "FromForm.Name",It is inserting null value in database.
Thanks and Regards,
Mayur Nabeda
Coforge DPA
GB
Hi ,
From the screenshot the only thing I can come up is that "FromForm.Name" doesnt have a value at that point of time .
HCL Technologies
IN
Hi,
Please tell me how to map FromForm.Name" value in property-set field.
PEG
IN
Add new step with Property-Set method to assign the value for FromForm.Name above the first step if it doesn't exist.
Note: FromForm.Name Value should be present in clipboard before assigning it to ToDB.name property. I think If values doesn't present in clipboard you will see null value in database.
Coforge DPA
GB
Hi Mayur
In Step 1 - Do a property-set on FromForm.Name = "abc"
STep 2: Do a property-set on ToDB.Name = FromForm.Name
Step 3: Obj-Save
Make sure , FromForm.Name has a value before you assign it to ToDB.Name
HCL Technologies
IN
Hi,
I have to take value from clipboard page i.e pyWorkpage.
How do I set it on FromForm.Name in my activity.How can I take value FromForm.Name=From Clipboard not hard-code value,As If I give FromForm.Name="abc",It will get Inserted but I am trying to have this data from clipboard. What should I do ?
Coforge DPA
GB
HI ,
Do a property-Set as FromForm.Name = pyWorkPage.<PropertyName> (Ideally try using Top or Primary instead of pyWorkpage)
Hope this is clear now.
HCL Technologies
IN
Hi,
Yes It is working and data is inserting into the datatable.But,Please check this screen shots
This is my activity according to your previous suggestion
1. As I am inserting data from text field on click of INSERT button,It calls an activity
2. Now, On first click check my clipboard page.It shows NULL and also insert NULL in the data table.
3. Now If I click second time on insert button,the clipboard shows the value and insert it into database.
Hi,
Yes It is working and data is inserting into the datatable.But,Please check this screen shots
This is my activity according to your previous suggestion
1. As I am inserting data from text field on click of INSERT button,It calls an activity
2. Now, On first click check my clipboard page.It shows NULL and also insert NULL in the data table.
3. Now If I click second time on insert button,the clipboard shows the value and insert it into database.
Please provide suggestion on this scenario.
Thanks
Mayur
Coforge DPA
GB
Hi ,
What I understood is that if you enter the name and Click "Next " the clipboard doesnt have a value so it inserts NULL in DB.
So try giving a "Refresh Section" or "Post Value" on the Onchange event of Text box where you enter the name.
This should resolve the issue
Thanks
HCL Technologies
IN
Hi,
Thank you so much Bhavya. Now it is working.