Problem getting data from a select dropdown from a record set

I have a select statement that populates from a server connect. All works as it should but after the value is changed I want to update the datastore value with the value from the select statement. @teodor @patrick

<select id="altaddresschoice" class="form-select" dmx-bind:options="conn_altAddresses.data.queryAltAddresses" optionvalue="AddressPK" optiontext="Name+' | '+Address1+', '+Address2+', '+City+', '+Description+', '+ZipCode+' ('+Contact+') '" name="altaddresschoice" dmx-on:changed="conn_updateShippingAddress.load({filteraddress: value});ShippingDimensions.update({});shippingArray.update({$id: 1}, {addressfk: value.toNumber(), shippingAddress1: Address1})" dmx-bind:value="shippingArray.data[0].addressfk">
                      <option value="">Choose an alternate shipping address</option>
                    </select>

here is a graphic of showing the value I’m trying to retrieve

Try changing this to dmx-on:updated and see if that rectifies it @baub

no love…. Its just not getting the value. I think its out of the update scope?

What about echoing the change to a hidden input and using that to populate the Data Store? Until the Team get back to you may be worth a try if you need to get it sorted quickly.

The changed/updated action works on the select not the individual option value. You would need to retrieve that part - something like :

<select id="altaddresschoice" class="form-select" dmx-bind:options="conn_altAddresses.data.queryAltAddresses" optionvalue="AddressPK" optiontext="Name+' | '+Address1+', '+Address2+', '+City+', '+Description+', '+ZipCode+' ('+Contact+') '" name="altaddresschoice" dmx-on:changed="conn_updateShippingAddress.load({filteraddress: value});ShippingDimensions.update({});shippingArray.update({$id: 1}, {addressfk: value.toNumber(), shippingAddress1: conn_altAddresses.data.queryAltAddresses .where('AddressPK',value.toNumber(),'==')[0].Address1})" dmx-bind:value="shippingArray.data[0].addressfk">
                      <option value="">Choose an alternate shipping address</option>
                    </select>

ok, issue resolved. In the onsuccess of the dmx:updated I updat a separate server connect that picks the actual record from database that I needed. But then I put the datastore update on the onsuccess of updating the server connect to update the datastore. If that makes sense? But I appreciate the help!!!

<dmx-serverconnect id="conn_addressDetailAfterUpdate" url="/dmxConnect/api/Addresses/addressDetailQry.asp" dmx-param:filter="varShowCreateShipment.value" noload="true" dmx-on:success="shippingArray.update({$id: 1}, {shippingAddress1: conn_addressDetailAfterUpdate.data.queryAddressDetails.Address1, shippingAddress2: conn_addressDetailAfterUpdate.data.queryAddressDetails.Address2, phone: conn_addressDetailAfterUpdate.data.queryAddressDetails.Phone, shippingCity: conn_addressDetailAfterUpdate.data.queryAddressDetails.City, shippingState: conn_addressDetailAfterUpdate.data.queryAddressDetails.statecode, shippingZip: conn_addressDetailAfterUpdate.data.queryAddressDetails.ZipCode, shippingContact: conn_addressDetailAfterUpdate.data.queryAddressDetails.Contact, shippingAddress1: conn_addressDetailAfterUpdate.data.queryAddressDetails.Address1, shippingName: conn_addressDetailAfterUpdate.data.queryAddressDetails.Name})"></dmx-serverconnect>


<select id="altaddresschoice" class="form-select" dmx-bind:options="conn_altAddresses.data.queryAltAddresses" optionvalue="AddressPK" optiontext="Name+' | '+Address1+', '+Address2+', '+City+', '+Description+', '+ZipCode+' ('+Contact+') '" name="altaddresschoice" dmx-on:updated="varWhichAltAddress.setValue(value);conn_addressDetailAfterUpdate.load({filter: value});conn_updateShippingAddress.load({filteraddress: value});ShippingDimensions.update({});shippingArray.update({$id: 1}, {addressfk: value.toNumber()})" dmx-bind:value="shippingArray.data[0].addressfk">
                      <option value="">Choose an alternate shipping address</option>
                    </select>