Friday, June 23, 2017

Set Value DA for Cascade LOV field

One of my app is having some LOV fields, some of them are Cascade, something like this:

First Field, LOV, upon chosen, it shall set the value of the second LOV using Set Value Dynamic Action(and set the value of the third LOV field in the same DA, DA is based on the first table A)
Second LOV is the parent of Third LOV which is based on second Table B.

So basically when customer choose the first value, it will check table A, if it has the relative value for the second Field/third field, I would like the DA to populate them over; if it's relative value is null for those fields, customer will choose the LOV based on Table B.

Well, the DA works on the Second LOV field, setting the value correctly but not the Third field, seems like the DA just not able to set the value correctly(If I set the third field as Text field, the DA works correctly)

After some testing, it seems like that since the DA is a change DA on first field, so it did set the value for both the second LOV field and the third field; but since the second LOV field changes its value by the DA, it also resets the value of the third LOV filed.

Here is what I came out for the remedy:

1. create a clone item for the third field(hide field)
2. in the first DA, set the value of the Cloned Field
3. Create second field DA (triggered when the second(parent) field changes values): set value to set the third field to its clone.

That seems solved the problem!


No comments:

Post a Comment