Skip to Content
0

How to use exclude option and to pass multiple values for the codelist field while configuring OVS

Dec 16, 2016 at 05:16 AM

115

avatar image

Hi Experts

I have created a Custom OVS for my Custom Business object.

OVSSelectorInport is having CustomObject ID and Status as the inport parameters to filter the values.


I have configured this OVS to an ID field of the same BO which is nothing but the sub object of the main custom object.

The requirement is I want to see only the instances whose

CustomObject ID - Not equal to the value passed in the Inport(Excluding)
Status : Equal to Open (Code- 01) & Inprocess -(Code-02)

I have tried in many ways but m not able to get the expected results.

Please share your thoughts on this.

Regards
Arjun

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Fred K Dec 16, 2016 at 11:00 AM
0

Hi Arjun,

->CustomObject ID - Not equal to the value passed in the Inport(Excluding)

How about creating a custom Reuse Library function and use it in Field Transformation?

->Status : Equal to Open (Code- 01) & Inprocess -(Code-02)

Low Value and High Value can be set for the selection parameter. It is not working as you expected?

Or you can add multiple lines (options) for equals for the selection parameter.

Best Regards,

Fred

Share
10 |10000 characters needed characters left characters exceeded
Arjun Raghav Dec 19, 2016 at 06:32 AM
0

Hi Fred,

Thanks for your response.

>CustomObject ID - Not equal to the value passed in the Inport(Excluding)

Is there a way to notify the OVS query exclude the ID entered in this OVS configuration screen.I have the ID of the Custom Object in the Data Model after mapping that ID to the ID field of OVS inport instead of include i have to make that as exclude.

I am already using a reuse library for generating my Custom Object ID but in this if I want to get the ID how should I design my reuse library.

->Status : Equal to Open (Code- 01) & Inprocess -(Code-02)

How to give multiple code values in this screen when I try giving 01;02 in the status row it was throwing a screen dump.

Regards,

Arjun


3mkrr.png (18.1 kB)
Share
10 |10000 characters needed characters left characters exceeded
Fred K Dec 19, 2016 at 08:55 AM
0

Dear Arjun,

>CustomObject ID - Not equal to the value passed in the Inport(Excluding)

Sorry, I was wrong. It is not possible to bind with UI elements in Field Transformation. Only possible to bind with BO elements.

I am checking other possible options.

->Status : Equal to Open (Code- 01) & Inprocess -(Code-02)

This is what I meant. Sorry, if this is not applicable for you.

Best Regards,

Fred


Share
10 |10000 characters needed characters left characters exceeded
Arjun Raghav Dec 20, 2016 at 05:35 AM
0

Hi Fred,

If I default the status as 01 and 02 in the Default set level then this OVS will become static.It will always fetch the values of instances whose status is either 01 or 02.

Is there a way to pass multiple status values in the Inport of OVS.

For the excluding option of current Instance in the OVS please provide a suggestion.

Regards

Arjun

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Arjun,

The only way I can think of is to create a dummy business object for the parameters.

Limitation: The user can only create one instance at a time.

1. Create a dummy business object.

businessobject Dummy {

[AlternativeKey] element UserUUID: UUID;

element CustomID: ID;

element Status : Status;

}

2. Write this in the AfterModify of your custom business object. (not the BO of OVS)

var eleDummy : elementsof Dummy;

var userUUID = Context.GetCurrentIdentityUUID();

var dummyInstance = Dummy.Retrieve (uuid);

if(dummyInstance.IsSet()){

dummyInstance.CustomID = "1";

dummyInstance.Status = "1";

}else{

eleDummy.UserUUID = userUUID;

eleDummy.CustomID = "1";

eleDummy.Status = "1";

Dummy.Create(eleDummy);

}

3. Create a reuse library with two function "GetID" and "GetStatus". Check the check box "To be used in UI designer" when you create the function and write the following codes.

GetID.absl

var userUUID = Context.GetCurrentIdentityUUID();

var dummyInstance= Dummy.Retrieve(userUUID);

if(dummyInstance.IsSet()){

result = dummyInstance.CustomID;

}

GetStatus.absl

var userUUID = Context.GetCurrentIdentityUUID();

var dummyInstance= Dummy.Retrieve(userUUID);

if(dummyInstance.IsSet()){

result = dummyInstance.Status;

}

4. Use the reuse function as field transformations in "Select Options for the selected query parameters".

Best Regards,

Fred

0