baub
August 6, 2026, 6:10pm
1
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
Cheese
August 6, 2026, 6:21pm
2
baub:
dmx-on:changed
Try changing this to dmx-on:updated and see if that rectifies it @baub
baub
August 6, 2026, 6:25pm
3
no love…. Its just not getting the value. I think its out of the update scope?
Cheese
August 6, 2026, 8:34pm
4
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.
bpj
August 7, 2026, 6:24am
5
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>
baub
August 7, 2026, 3:15pm
6
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>