Hi there ![]()
I am trying to configure a button whose visibility is dependent on a helper-boolean field. The helper field is inside a CombinedDataModel:
Dependent fields:
- bookingPeriodEnd
** Model: Booking (included in CDM) - ExpiryDate
** Model: Contract (included in CDM)
What am I trying to do:
- if bookingPeriodEnd >= ExpiryDate ā show button in ContractCDMForm
- if bookingPeriodEnd < ExpiryDate ā Show (booking-) Button in ContractCDMForm
The ContractCDM includes the Booking model with a multiplicity of 999.999
I tried to accomplish this with:
- define a helper field CriteriaNextInstallmentButton in the ContractCDM model also with the calculation of the field CompCriteriaNextInstallmentButton.
Formula:
Condition:
AtLeastOneFieldFilled(/ContractBooking_relationship*/Booking/BookingMetaData/bookingPeriodEnd)
AND
AtLeastOneGroupFilled(/ContractBooking_relationship*/Booking/BookingMetaData/bookingPeriodEnd
Having [/ContractBooking_relationship/Booking/BookingMetaData/bookingPeriodEnd]
>= [/Contract/ContractData/Dates/ExpiryDate])
Calculation result: false
And for true:
AtLeastOneFieldFilled(/ContractBooking_relationship*/Booking/BookingMetaData/bookingPeriodEnd)
AND
NoGroupFilled(/ContractBooking_relationship*/Booking/BookingMetaData/bookingPeriodEnd
Having [/ContractBooking_relationship/Booking/BookingMetaData/bookingPeriodEnd]
>= [/Contract/ContractData/Dates/ExpiryDate])
In the form a dependent control on the boolean field was set.
Problem: The calculation does not work: In the designated screen when ExpiryDate = bookingPeriodEnd. The result of the field is then true instead of false.
Another approach was done with the following formula:
[/Contract/ContractData/ContractStatus] !="policy-created"
Or
NumberOfFilledFields(/ContractBooking_relationship*/Booking/BookingMetaData/bookingPeriodEnd
Having [/ContractBooking_relationship/Booking/BookingMetaData/bookingPeriodEnd]
>= [/Contract/ContractData/Dates/ExpiryDate]) >= 1
which resulted in the field not being calculated at all (-keine Daten-)
Does someone has an Idea how to solve this?
If you need more information please ask ![]()
Kind regards,
Timo

