Page 2 of 2 < 1 2
Topic Options
Rate This Topic
#135220 - 08/23/06 12:03 PM Re: Refreshing field after dialog window closes [Re: Vincent_RIEDWEG]
remedybuff Offline
Stealth Member

Registered: 05/05/06
Posts: 76
Loc: New Jersey, USA
Its a java process, that I call using the bat script by providing the path in the command line..

for eg. C:/j2sdk1.4.2_11/bin/...... (arguments)

Top
#135221 - 08/23/06 12:16 PM Re: Refreshing field after dialog window closes [Re: remedybuff]
Vincent_RIEDWEG Offline

Old Hand
****

Registered: 05/24/05
Posts: 1454
Loc: France
Ok, your process isn't an internal one's. Then, you need to save the new value to the database after you Set Field and before your Run Process. You can do the following's :

1 - Update just the Date/Time field by an update in Direct SQL.
2 - Push just this Date/Time field using a Push Field. This will update too the system fields modification date and modified by.
3 - Use a Commit (your choice) to update all modified values in the database.
_________________________
Vincent.

Top
#135222 - 08/23/06 01:09 PM Re: Refreshing field after dialog window closes [Re: Vincent_RIEDWEG]
remedybuff Offline
Stealth Member

Registered: 05/05/06
Posts: 76
Loc: New Jersey, USA
Are you saying i push the values to the same form? Also, should I push the same field to itself?

Also, could you please give me some idea as to how the update statement will look like?

Thanks

Top
#135223 - 08/23/06 01:43 PM Re: Refreshing field after dialog window closes [Re: remedybuff]
Vincent_RIEDWEG Offline

Old Hand
****

Registered: 05/24/05
Posts: 1454
Loc: France
Yes, you need to push this field into itself in the same form and in the same record. You push this field to modify the current record.

SQL example :
update view_name_of_the_form set name_of_date_time_field_in_view=$temp_integer$ where request_id='$Request ID$'

But, you need to set the Date/Time field in a temporary Integer field before the SQL.
_________________________
Vincent.

Top
#135232 - 08/24/06 08:57 AM Re: Refreshing field after dialog window closes [Re: Vincent_RIEDWEG]
remedybuff Offline
Stealth Member

Registered: 05/05/06
Posts: 76
Loc: New Jersey, USA
Hi,

I am now able to achieve what I wanted to,but I did it a different way. I tried using the SQL statement, but I think I was doing something wrong..Here is the Direct SQL statement I used,

update Default_Admin_View set Schedule_time = $temp_Schedule$ where request_id='$Request ID$'

But I get the error saying, "error near the end of SQL statement". I didnt quite get it.

Anyway, I used another hidden field as a qualification for my workflow, instead of using the original date/time field. So, instead of checking for modifications in the original date/time field, I check this new hidden field for qualification.

But here is the thing, when I close the dialog box and everything runs OK, I still have to click "Save" on the main form to store the changes that have happened.

For eg. the new qualification field is set to 1 if there was a change in the original date/time field else 0. Now, if I make a change in the dialog window, and close the window, the original date/time field is updated and the qualification field is set to 1. But if I do not "Save" the updated record in the main form and log back in again without saving, the original date/time field is set back to the old value, not to the new value that was updated in the dialog window last time..

Is there any way by which I could automatically save when I close the dialog window..?? (Commit doesnt seem to work here)

Thanks,

Anuj.

Top
#135233 - 08/24/06 09:01 AM Re: Refreshing field after dialog window closes [Re: remedybuff]
Vincent_RIEDWEG Offline

Old Hand
****

Registered: 05/24/05
Posts: 1454
Loc: France
Originally Posted By: anujtuli
update Default_Admin_View set Schedule_time = $temp_Schedule$ where request_id='$Request ID$'


it isn't Default_Admin_View, but the name of the view associated with this form in the database...
_________________________
Vincent.

Top
#135234 - 08/24/06 09:03 AM Re: Refreshing field after dialog window closes [Re: Vincent_RIEDWEG]
remedybuff Offline
Stealth Member

Registered: 05/05/06
Posts: 76
Loc: New Jersey, USA
oops sorry.. but I do not have access to the database on the server....

Is there any other way to know the view name apart from going to the database?

Top
#135235 - 08/24/06 09:11 AM Re: Refreshing field after dialog window closes [Re: remedybuff]
Vincent_RIEDWEG Offline

Old Hand
****

Registered: 05/24/05
Posts: 1454
Loc: France
Yes,

You replace all not a-z or not 0-9 characters by _.

Then you need to truncate the result to just the first 30 characters.

In some cases (for similar and long forms names), you need to specify the schemaid at the end.
_________________________
Vincent.

Top
#135236 - 08/24/06 09:14 AM Re: Refreshing field after dialog window closes [Re: Vincent_RIEDWEG]
remedybuff Offline
Stealth Member

Registered: 05/05/06
Posts: 76
Loc: New Jersey, USA
So, if my form name was CHG:MyForm, it will become CHG_MyForm, right?

Will try it out...

One other thing I mentioned in my previous post was the ability to save automatically..

Any ideas for that?

Thanks,

Anuj.


Edited by anujtuli (08/24/06 09:16 AM)

Top
#135237 - 08/24/06 09:26 AM Re: Refreshing field after dialog window closes [Re: remedybuff]
Vincent_RIEDWEG Offline

Old Hand
****

Registered: 05/24/05
Posts: 1454
Loc: France
Originally Posted By: anujtuli
Is there any way by which I could automatically save when I close the dialog window..?? (Commit doesnt seem to work here)


Yes, using SQL or Push Field...

yes, it's chg_myform...

It's the same rule used for field names in the view...
_________________________
Vincent.

Top
Page 2 of 2 < 1 2