Is there way to sync only one coverage in guidewire?

58 Views Asked by At

I have one coverage and 4 covterms under that (all are dropdowns). Eg : covTerm1 has any value then covTerm2, covTerm3, covTerm4 should not be available. If covTerm2, covTerm3, covTerm4 has any values then covTerm1 should disappear from screen. Is there any way I can handle this scenario?

I have give availability script through product designer. covTerm2, covTerm3, covTerm4 are working as expected. but covTerm1 is not going from screen when I select any values for covTerm2, covTerm3, covTerm4.

1

There are 1 best solutions below

2
Martin Aavik On

You're asking two very different questions (maybe three?) so I'll try to answer both. But I think you're not giving enough information for me to be certain. I'm assuming you're working inside the PolicyCenter UI, not in a Digital front-end.

First, the easy answer. To sync one or more coverages use the createOrSyncCoverages(["PatternCode1", "PatternCode2"}) method on the coverable in question. The ootb CoverageInputSet implementations may already use this, depending on what action you're taking.

Your second (and I think real) question is, how do I get my UI to refresh after I've changed some value that drives availability. The answer is that the field you're changing has to do a postOnChange to do a trip to the server and retrieve the updated presentation model. From the sound of it, your Term1 is doing that, but your other terms are not. Review how your PCF file(s) are implemented and look for the difference between your Term1 settings vs the others.

Finally, be cautious and questioning about required behaviors like this. What you're doing to the user is changing screen layout "unpredictably" and making their lives harder, not easier. Alternatives to visibility are availability - that is, make Term1 uneditable and greyed out rather than removing it from view completely. But you can certainly achieve what you're trying to do.