Unable to set default value in Edit form

Hi.... I am trying to set a value in spRendered if a form is in "Edit", but has no value saved in three fields.

The first two are lookups and work fine using the following where hoteState and hoteName are pre-defined variables with a value.
fd.field('HotelState').value = hotelState;
fd.field('HoteName').value = hotelName;

The third field is a drop-down with the values populated by a Data Source and the value is saved to a single line text field.

I have tried all of the following:
fd.control('HotelCityLU').ready().then(function(control) {
fd.field('HotelCityLU').value.Title = hotelCity;
fd.field('HotelCityLU').value.Id = 100;
}):
where hotelCity is a var with a pre-defined value.
This code gives an error of fd.control(...) is undefined.

I have changed the above to:
fd.control('HotelCityLU').ready().then(function(control) {
fd.field('HotelCityLU').value = hotelCity;
fd.field('HotelCityLU').value = 100;
}):
where hotelCity is a var with a pre-defined value.
The error here is Uncaught (in promise) TypeError fd.control(...) is undefined.

I have changed the above to :
fd.control('HotelCityLU').ready().then(function(control) {
fd.control('HotelCityLU').value.Title = hotelCity;
fd.control('HotelCityLU').value.Id = 100;
}):
This yields this error "Uncaught (in promise) TypeError: fd.control(...) value is undefined.

I have tried JUST:
fd.field('HotelCityLU').value = hotelCity;
fd.field('HotelCityLU').value = 100;
The error here is: Type Error fd.field(...) is undefined.

I have tried JUST:
fd.control('HotelCityLU').value = hotelCity;
fd.control('HotelCityLU').value = 100;
The error here is: Uncaught (in promise) TypeError: fd.control(...) value is undefined.

I have tried JUST:
fd.control('HotelCityLU').value.Title = hotelCity;
fd.control('HotelCityLU').value.Id = 100;
The error here is: Uncaught (in promise) TypeError: fd.control(...) value is undefined.

I have read and re-read the documentation on LookUps and several questions in this discussion regarding setting lookup values.

See attachments for screenshots of the form (in Design) and column definitions.

Thank you, Rhonda
20230911ErrorwSettingLookup.pdf (326.6 KB)
20230911SPFields.pdf (928.8 KB)

Hello @rhonda,

Please export the form and share it with me. I will inspect the code you have. You can DM it to me.


p