I thought this would be simple. I'm using an SQL Server connection to an on-premise server. I have a Client form and I want to copy the Billing address to the Shipping address (attached). I have a button to trigger copy (CopyBilling2Shipping). In the OnSelect property of the button I have:
OnSelect = ShippingStreetVal.Text = BillingStreetVal.Text (the Val fields are the datacard value fields).
I don't get any errors but nothing happens. I'm sure there is a simple fix but I've looked around and can't find it.
You cannot use simple assignments here as your "ShippingStreetVal.Text" is probably already bound to its parent card value.
You can get some ideas of how this can be done from here:
It did give me some ideas on how to solve.
1. Used button to set context variable (copyB2S)
2. In each datacard set Default to If(copyB2S, BillingStreetVar.Text,ThisItem.ShippingStreet)
3. On save I refresh data if copyB2S is set and then unset.
SubmitForm(ClientEditFM);If(copyB2S,Refresh('[dbo].[Client]'),false);UpdateContext({copyB2S:false})
Hi @mogulman,
Have you solved your problem?
I have made a test on my side and please take a try with the following steps:
UpdateContext({ButtonPress:true})
If(ButtonPress=true,BillingStreetVar.Text,Parent.Default)
SubmitForm(ClientEditFM);If(ButtonPress=true,Refresh('[dbo].[Client]'),false);UpdateContext({ButtonPress:false})
If you have solved your problem, please click "Accept as Solution" so that this thread will be marked for other users to easily identify if your problem is solved.
Best regards,
Kris
User | Count |
---|---|
256 | |
110 | |
90 | |
51 | |
44 |