Solved! Go to Solution.
Hi @aberson ,
Could you please share a bit more about your scenario?
Do you want to disable or hide the Contact field till the Customer field value is selected?
Based on the needs that you mentioned, I think the "Business rules" functionality in CDS Entity could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:
More details about creating a Business Rule for a Entity, please check the following article:
Please consider take a try with above solution, check if the issue is solved.
Best regards,
I tried the java and am unable to select the entire input. I can hide the input by using .parent() and the label separately.
However, if i start with the field hidden from the form i can't grab it to show it.... I can't seem to find the logical name of the entity form input to take action on it....
Hi @aberson ,
Have you taken a Custom JavaScript to achieve your needs?
Based on the needs that you mentioned, I also agree with @sandeepd 's thought almost. You could consider add a custom JavaScript to the Entity form to control the form field visible or invisible through Power Portal Management.
I have made a test on my side, please consider take a try with the following workaround:
Please consider go to your Portal Management (Model-Driven app), then click "Entity forms" tab, then select the Entity form where you want to achieve your logic.
Then switch to "Additional Settings" tab, scroll down to the "Custom JavaScript" part, type the above JavaScript code, then save your Entity form.
$(document).ready(function(){
var currentValue = $("#crba2_customer").val();
if(currentValue==null || currentValue == ''){
$("#crba2_normalcontact").style.display = 'none'
}else{
$("#crba2_normalcontact").style.display = 'block'
}
})
After that, re-open your Portal, then check if the issue is solved.
More details about adding a custom JavaScript in Entity forms/Web Forms, please check the following article:
https://docs.microsoft.com/en-us/powerapps/maker/portals/configure/add-custom-javascript
Best regards,