In my app, dependent on a different selection above the cards, one of two cards will be displayed(ACHAccountCard or EFTAccountCard). For testing they are both visible right now.
Both cards have a dropdown "Account Type" field that retrieves names from a secondary list. Depending on the item they select, I retrieve the code that is used by SAP from a different column and store it in the form.
ACHAccountCard Example:
ACHAcctType DropDown items = Sort(Distinct(VendorDataList,AccountType),Result)
The ACHAcctCode field(Text) default = LookUp(VendorDataList,AccountType = ACHAcctType.Selected.Result,AccountTypeCode)
EFTAccountCard dropdown is the same
EFTAcctCode = LookUp(VendorDataList,AccountType = EFTAcctType.Selected.Result,AccountTypeCode)
Both of these work to set their independent Code fields.
The issue is I have one "accttype" field that I want to be set depending on which of the two codes were set.
I have the accttype (text) field default = If(ACHAcctCode.Text <> "-",ACHAcctCode,EFTAcctCode.Text <> "-",EFTAcctCode) but it never sets the value based on the EFTAcctCode, even if I leave the ACHAcctCode as the default ( "-") .
In the image below you can see that ACHAccttype is "-" and the EFTAcctType = "GL..... ", and the code retrieved is "GL" But the "accttype" field is "blank":
If I select a value for ACHAcctType, then it set the field correctly:
Solved! Go to Solution.
After trial and error I rethought what I was doing and decided to use a variable I was already setting.
in the form above the cards, I have selection controls for the method of pay, which sets a variable (varmetpay):
The selection will decide what card displays to enter the payment Information.
So, for my "accttype" field that stores the code selected that will be sent to SAP, I choose to set the default value = to "varmetpay" :
If(varmetpay = "T", ACHAcctCode,varmetpay = "E",EFTAcctCode).
and the accttype field is updated based on which acctcode is set now 🙂
After trial and error I rethought what I was doing and decided to use a variable I was already setting.
in the form above the cards, I have selection controls for the method of pay, which sets a variable (varmetpay):
The selection will decide what card displays to enter the payment Information.
So, for my "accttype" field that stores the code selected that will be sent to SAP, I choose to set the default value = to "varmetpay" :
If(varmetpay = "T", ACHAcctCode,varmetpay = "E",EFTAcctCode).
and the accttype field is updated based on which acctcode is set now 🙂
User | Count |
---|---|
254 | |
252 | |
83 | |
42 | |
31 |
User | Count |
---|---|
321 | |
266 | |
119 | |
70 | |
52 |