Maximo List Archive

This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.



Update DateTime field via SetValue in Actions

From: Jason Verly (2011-11-23 21:38)

I'm trying to setup an Action to update a DateTime field (WORKORDER.
SCHEDSTART) to be the date value of WORKORDER.TARGSTARTDATE plus 7
days. I have a validation check in the Escalation to ensure that it is only applied to records that have a value in the TARGSTARTDATE field.
In SQL Queries, the following statement would give me what I want:

WORKORDER.TARGSTARTDATE + 7

But when I add a similar statement in SETVALUE function for a Action, I get the following error:

BMXAA3056E - The expression could not be parsed because of a syntax
error.
BMXAA4210E - Database error number 4145 has occurred.
[DFHEPSADEV05]An expression of non-boolean type specified in a context
where a condition is expected, near '7'.

Any suggestion on how to update a DateTime field in Maximo?


From: Sean Clark-McCarthy (2011-11-23 16:59)

Can you see the SQL that is being executed?
Could try using a Database function? DATEADD(day,7,TARGSTARTDATE)
-- Sean Clark-McCarthy
From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of Jason Verly
Sent: Wednesday, November 23, 2011 4:38 PM
To: MAXIMO@yahoogroups.com
Subject: [MAXIMO List] Update DateTime field via SetValue in Actions
I'm trying to setup an Action to update a DateTime field (WORKORDER.
SCHEDSTART) to be the date value of WORKORDER.TARGSTARTDATE plus 7
days. I have a validation check in the Escalation to ensure that it is only applied to records that have a value in the TARGSTARTDATE field.
In SQL Queries, the following statement would give me what I want:
WORKORDER.TARGSTARTDATE + 7
But when I add a similar statement in SETVALUE function for a Action, I get the following error:
BMXAA3056E - The expression could not be parsed because of a syntax
error.
BMXAA4210E - Database error number 4145 has occurred.
[DFHEPSADEV05]An expression of non-boolean type specified in a context
where a condition is expected, near '7'.
Any suggestion on how to update a DateTime field in Maximo?


From: in2data (2011-11-28 18:41)

Hi,
You have to use the Maximo application values.
Try
:WORKORDER.TARGSTARTDATE+7
or
:&WORKORDER.TARGSTARTDATE&+7
or leave out WORKORDER. You should not need it.
Put the schedstartdate as the attribute.
Dave Bone
--- In MAXIMO@yahoogroups.com, "Jason Verly" <jason.verly@...> wrote:
>
> I'm trying to setup an Action to update a DateTime field (WORKORDER.
> SCHEDSTART) to be the date value of WORKORDER.TARGSTARTDATE plus 7
> days. I have a validation check in the Escalation to ensure that it is only applied to records that have a value in the TARGSTARTDATE field.
>
> In SQL Queries, the following statement would give me what I want:
>
> WORKORDER.TARGSTARTDATE + 7
>
> But when I add a similar statement in SETVALUE function for a Action, I get the following error:
>
> BMXAA3056E - The expression could not be parsed because of a syntax
> error.
> BMXAA4210E - Database error number 4145 has occurred.
> [DFHEPSADEV05]An expression of non-boolean type specified in a context
> where a condition is expected, near '7'.
>
> Any suggestion on how to update a DateTime field in Maximo?
>


From: Jason Verly (2011-11-28 20:54)


My bad, my original post did not include the colon. In expresssion builder I was in fact using the application value of ":TARGSTARTDATE" because that's what got populated when I chose the field from the selection box.
Using ":workorder.targstartdate+7" brings up an invalid relationship error for a Work Order to Work Order relationship.
--- In MAXIMO@yahoogroups.com, "in2data" <in2data@...> wrote:
>
> Hi,
>
> You have to use the Maximo application values.
>
> Try
>
> :WORKORDER.TARGSTARTDATE+7
>
> or
>
> :&WORKORDER.TARGSTARTDATE&+7
>
> or leave out WORKORDER. You should not need it.
>
> Put the schedstartdate as the attribute.
>
> Dave Bone
>
> --- In MAXIMO@yahoogroups.com, "Jason Verly" <jason.verly@> wrote:
> >
> > I'm trying to setup an Action to update a DateTime field (WORKORDER.
> > SCHEDSTART) to be the date value of WORKORDER.TARGSTARTDATE plus 7
> > days. I have a validation check in the Escalation to ensure that it is only applied to records that have a value in the TARGSTARTDATE field.
> >
> > In SQL Queries, the following statement would give me what I want:
> >
> > WORKORDER.TARGSTARTDATE + 7
> >
> > But when I add a similar statement in SETVALUE function for a Action, I get the following error:
> >
> > BMXAA3056E - The expression could not be parsed because of a syntax
> > error.
> > BMXAA4210E - Database error number 4145 has occurred.
> > [DFHEPSADEV05]An expression of non-boolean type specified in a context
> > where a condition is expected, near '7'.
> >
> > Any suggestion on how to update a DateTime field in Maximo?
> >
>


From: Jason Verly (2011-11-28 20:56)

yep, I had tried that too before I posted to the group. I get:
BMXAA3056E - The expression could not be parsed because of a syntax error.
BMXAA4210E - Database error number 4145 has occurred.
[DFHEPSADEV05]An expression of non-boolean type specified in a context where a condition is expected, near ')'.
--- In MAXIMO@yahoogroups.com, Sean Clark-McCarthy <smccarthy@...> wrote:
>
> Can you see the SQL that is being executed?
>
> Could try using a Database function? DATEADD(day,7,TARGSTARTDATE)
>
>
> -- Sean Clark-McCarthy
>
> From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of Jason Verly
> Sent: Wednesday, November 23, 2011 4:38 PM
> To: MAXIMO@yahoogroups.com
> Subject: [MAXIMO List] Update DateTime field via SetValue in Actions
>
>
>
> I'm trying to setup an Action to update a DateTime field (WORKORDER.
> SCHEDSTART) to be the date value of WORKORDER.TARGSTARTDATE plus 7
> days. I have a validation check in the Escalation to ensure that it is only applied to records that have a value in the TARGSTARTDATE field.
>
> In SQL Queries, the following statement would give me what I want:
>
> WORKORDER.TARGSTARTDATE + 7
>
> But when I add a similar statement in SETVALUE function for a Action, I get the following error:
>
> BMXAA3056E - The expression could not be parsed because of a syntax
> error.
> BMXAA4210E - Database error number 4145 has occurred.
> [DFHEPSADEV05]An expression of non-boolean type specified in a context
> where a condition is expected, near '7'.
>
> Any suggestion on how to update a DateTime field in Maximo?
>
>
>
>
>


From: Jason Verly (2011-11-30 21:00)

Found a fix..... ignore Expression Builder errors! Even though I got an error with the simple add function (:targstartdate + 7), the set value action does fire with an Escalation.
--- In MAXIMO@yahoogroups.com, "Jason Verly" <jason.verly@...> wrote:
>
> yep, I had tried that too before I posted to the group. I get:
>
> BMXAA3056E - The expression could not be parsed because of a syntax error.
> BMXAA4210E - Database error number 4145 has occurred.
> [DFHEPSADEV05]An expression of non-boolean type specified in a context where a condition is expected, near ')'.
>
>
> --- In MAXIMO@yahoogroups.com, Sean Clark-McCarthy <smccarthy@> wrote:
> >
> > Can you see the SQL that is being executed?
> >
> > Could try using a Database function? DATEADD(day,7,TARGSTARTDATE)
> >
> >
> > -- Sean Clark-McCarthy
> >
> > From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of Jason Verly
> > Sent: Wednesday, November 23, 2011 4:38 PM
> > To: MAXIMO@yahoogroups.com
> > Subject: [MAXIMO List] Update DateTime field via SetValue in Actions
> >
> >
> >
> > I'm trying to setup an Action to update a DateTime field (WORKORDER.
> > SCHEDSTART) to be the date value of WORKORDER.TARGSTARTDATE plus 7
> > days. I have a validation check in the Escalation to ensure that it is only applied to records that have a value in the TARGSTARTDATE field.
> >
> > In SQL Queries, the following statement would give me what I want:
> >
> > WORKORDER.TARGSTARTDATE + 7
> >
> > But when I add a similar statement in SETVALUE function for a Action, I get the following error:
> >
> > BMXAA3056E - The expression could not be parsed because of a syntax
> > error.
> > BMXAA4210E - Database error number 4145 has occurred.
> > [DFHEPSADEV05]An expression of non-boolean type specified in a context
> > where a condition is expected, near '7'.
> >
> > Any suggestion on how to update a DateTime field in Maximo?
> >
> >
> >
> >
> >
>