Hi everyone,
I'm quite new working with power portals and can not find a solution. I believe there exists very simple code which would help me out.
I need to reset the lookup value (city) of the field when another one is changed (province) when editing or creating a new record. So far I have the below code but it just resets the lookup value, but doesn't clear it from the form and doesn't let me save the form (city is required field), so it's a bit confusing, maybe I just left a mistake in code:
$(document).ready(function () {
$("#cr52c_province").change(resetfield);
resetfield();
});
function resetfield() {
$("#cr52c_city").attr("value",null);
$("#cr52c_cityId").attr("value",null);
$("#cr52c_city").attr("value",null);
}
Moreover, the form cannot be saved even if the province field is not modified, so every time when the form is opened in edit mode, the city needs to be selected once again in order to save the edited form.
Please use PowerUsers forum for new Portal questions:
powerusers.microsoft.com/.../PowerAppsPortals
------------
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156