Skip to main content

Hello Dear Community Users,

 

I have a question regarding the following topic.

I need to add the current operation state and the state of the operation before the current operation as parameters. When the parameter popup window is opened, 2 pieces of operation status (Oper Status Code) field are displayed. Which one is present and which previous operation parameter is not understood. 

SELECT *
FROM shop_order_operation o
LEFT JOIN shop_order_operation prev_op
ON prev_op.order_no = o.order_no AND
prev_op.release_no = o.release_no AND
prev_op.sequence_no = o.sequence_no AND
prev_op.operation_no = shop_order_operation_api.get_previous_operation(o.order_no, o.release_no, o.sequence_no, o.operation_no)
WHERE
o.work_center_no = '&mMCS-L]Work_Center_No' AND
o.oper_status_code = '&mMCS-L]shop_order_operation.oper_status_code' AND
prev_op.oper_status_code = '&mMCS-L]operation_history.oper_status_code';

How do we make special prompt when we use view column which is enumeration?

 

Best Regards,

Barış

Hi,

This is not possible. The scanner for to prompts in the SQL treats each parameter individually even if the same is the same.

Regards,

Chanaka


Hi @baris.halici and @ChanakaAmarasekara 

 

I think it can be done using a small trick with custom fields ;)

 

here’s what I did in a Apps 10 environment but hope this will work in Apps9 also

 

Create a local custom field in OperationHistory and name the prompt as Previous Oper Status code

 

 

You may define translations if you need

refresh server caches

In the use the custom field as second status parameter. Hope it will does the work!

prev_op.oper_status_code = '&dMCS-L]operation_history_cfv.cf$_oper_status_code'

 

Cheers!

Damith


@baris.halici I haven't tried this but I think you could use a somewhat weird workaround:

Create a Custom LU with a single persistent attribute that uses the 'OperStatusCode' enumeration. Define the field's prompt with the label you want in the quick report and publish the Custom LU. In your quick report you should then be able to reference the custom attribute in the Custom LUs CLV-view (e.g. "dummy_lu_clv.cf$_oper_status_code" instead of "operation_history.oper_status_code".).

As mentioned I haven't tried this but I think this should work.


I hope what @Jonas Feigl suggests should work but I’m thinking of a different way.

 

Create a new Local custom field on Operation History for OPER_STATUS_CODE and name the Prompt as Previous Oper Status Code.

 

Change the reference in sql to use the CFV

 prev_op.oper_status_code = '&=MCS-L]operation_history_cfv.cf$_oper_status_code'

 

 

Hope it helps!

Damith


I actually asked if there is a clause that can be used directly within the parameter. As Mr @ChanakaAmarasekara  said, I think there is no such thing. 
@Jonas Feigl  and @dsj I think it's similar in both answers and it's a solution that will actually work.​ Thank you very much for the answers my friends.

 

Regards,

Barış