Hi,
I have 2 tables in Excel. First one is a list of assets called AssetList. The second is a record/transaction table called TransactionOut. In the app, the user selects from a combobox as many items as they wish to checkout. On the next page, when the user checks out the items, the checkout button, using a collection method, updates the excel TransctionsOut table with the users name(selected previously), the checkout date and of course the list of items they selected from the combo box.
The issue I am having is that the combobox data comes from the AssetList table and the column I am trying to update in the TransactionsOut table expects a text type and not a table type.
I cannot figure out how to properly convert my combobox selected values to a text type so the record can properly update.
This is the formula I am using:
Collect(TransactionOut, {CheckedOutTo: Scan1 & StaffName, AssetTag: ComboBox1.SelectedItems, DateTime: Text(Now())});Navigate(CheckoutConfirm2,ScreenTransition.None))
Please help.
Solved! Go to Solution.
Hi @tfmarcomtf,
Do you want to convert the selected Values within the ComboBox (in the first screen) into a Text value?
Do you want to add a new record into your TransctionsOut table?
Based on the needs that you mentioned, I think the Concat function could achieve your needs. I have made a test on my side, please consider modify your formula as below:
Collect(
TransactionOut,
{
CheckedOutTo: Scan1 & StaffName,
AssetTag: Concat(ComboBox1.SelectedItems, Value & "; "), /* <-- Modify formula here */
DateTime: Text(Now())
}
);
Navigate(CheckoutConfirm2,ScreenTransition.None)
In addition, you could also consider take a try with Patch function to achieve your needs, please take a try with the following formula:
Patch(
TransactionOut,
Defaults(TransactionOut),
{
CheckedOutTo: Scan1 & StaffName,
AssetTag: Concat(ComboBox1.SelectedItems, Value & "; "), /* <-- Modify formula here */
DateTime: Text(Now())
}
);
Navigate(CheckoutConfirm2,ScreenTransition.None)
More details about the Concat function, please check the following article:
Best regards,
Kris
Hi @tfmarcomtf,
Have you solved your problem?
If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.
Best regards,
Kris
Hi @tfmarcomtf,
Do you want to convert the selected Values within the ComboBox (in the first screen) into a Text value?
Do you want to add a new record into your TransctionsOut table?
Based on the needs that you mentioned, I think the Concat function could achieve your needs. I have made a test on my side, please consider modify your formula as below:
Collect(
TransactionOut,
{
CheckedOutTo: Scan1 & StaffName,
AssetTag: Concat(ComboBox1.SelectedItems, Value & "; "), /* <-- Modify formula here */
DateTime: Text(Now())
}
);
Navigate(CheckoutConfirm2,ScreenTransition.None)
In addition, you could also consider take a try with Patch function to achieve your needs, please take a try with the following formula:
Patch(
TransactionOut,
Defaults(TransactionOut),
{
CheckedOutTo: Scan1 & StaffName,
AssetTag: Concat(ComboBox1.SelectedItems, Value & "; "), /* <-- Modify formula here */
DateTime: Text(Now())
}
);
Navigate(CheckoutConfirm2,ScreenTransition.None)
More details about the Concat function, please check the following article:
Best regards,
Kris
Hi Kris,
Thanks for the reply!
Yes I want to convert the selected Values within the combobox into a text value so that I can add a new record in the TransactionsOut table. The values for Combobox are from the AssetList table (Eg. C1 (Camera 1), B2 (battery 2) etc.
The error I receive says that the AssetTag column in the TransactionsOut table only accepts text and the values I am supplying from the combobox is a record or a table value and not text.
The solution you provided seems to have worked! Thanks again!
Hi @tfmarcomtf,
Have you solved your problem?
If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.
Best regards,
Kris
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
184 | |
51 | |
47 | |
32 | |
32 |
User | Count |
---|---|
264 | |
91 | |
78 | |
68 | |
67 |