Yes that is correct I have a subgrid (child) where when I hit create new the child form appears and the name column is properly populated with name column from the parent record. However upon hitting save the child record retains all fields except the prepopulated lookup. My preference is to complete this task with just JS but I have yet to come across a successful method for that.
Here is my web template code:
{% assign caseticket = entities["ustpbppd_ustpbppdebtentity"][request.params.id] %}
<div class= "hidden">
<!--goes under div hidden-->
<p id = "entityName" > {{caseticket.ustpbppd_name}}</p> <!--logical name of parent table name column with lookup field on it-->
<p id = "entityID"> {{caseticket.ustpbppd_ustpbppdebtentityid}} <p> <!--logical name of parent table unique ID (GUID) column-->
<p id = "entityEntityName"> {{"ustpbppd_ustpbppdebtentity"}}<p> <!--logical name of parent table with lookup field on it-->
</div>
<div id="mainContent" class = "wrapper-body" role="main">
{% block main %}
{% include 'Page Copy' %}
{% include 'Child Navigation' showdescriptions: true %}
{% if page.adx_entitylist %}
{% include 'entity_list' key: page.adx_entitylist.id %}
{% endif %}
{% if page.adx_entityform %}
{% entityform id: page.adx_entityform.id %}
{% endif %}
{% if page.adx_webform %}
{% webform id: page.adx_webform.id %}
{% endif %}
{% endblock %}
</div>
Here is my javascript
$(document).ready(function(){
let entityName = window.parent.$('#entityName').text();
let entityID = window.parent.$('#entityID').text();
let tableName = window.parent.$('#entityEntityName').text();
$("#ustpbppd_ustpbppdebtentity_name").val(entityName);
$("#ustpbppd_ustpbppdebtentity_name").attr("value",entityName);
$("#ustpbppd_ustpbppdebtentity").attr("value",entityID);
$("#ustpbppd_ustpbppdebtentity_entityname").attr("value",tableName);
});