Hi everyone,
I am building an app in which I record some data from users inputs and depending on the chosen option in a dropdown list, I want to use that value to indicate the column name I am going to enter some data later. I've tried some other solutions and none of them worked. This is the last one I've tried, using a global variable but when I try to call it later it gets some error.
//Block in which, depending what data is saved if there is a previous order with the same Contract.
Set(Variable,Ddwn_device.SelectedText.Value);
If(
//Condition for modifying an existing record
Not(IsBlank(LookUp(Registry,Contract=contract.Text))),Patch(Registry,LookUp(Registry,Contract=contract.Text),{Total_Quantity:LookUp(Registry,Contract=contract.Text,Total_Quantity)+Value(quantity.Text)},{Value(Variable):Value(quantity.Text)}),
//Condition for creating a new record
Patch(Registry,Defaults(Registry),{Contract:contract.Text},{Date:Text(Date.SelectedDate)},{Customer:customer.Text},{Country:Ddwn_country.SelectedText.Value},{Requested_Date:Text(RequestedDate.SelectedDate)},{Condition:Ddwn_condition.SelectedText.Value},{Total_Quantity:quantity.Text}))