Hi Folks,
I have (2) SPL. For the purposes of this explanation please consider them as “Product a” and “Product b”.
In both SPL I have the same columns (=NAME & =type of data). i.e. is a duplicated list but different SPL's name.
My goal now is to create an app in which I can evaluate these 2 products at the same time.
For example: in both SPL, I have 1 column named as "SN#".
On the other side I have the PowerApps. My main form is connected to the database "Product a". My first data card is "SN#". In order to answer both SPL at the same time, I have inserted a "Text Input" on my "SN#" datacard, so it look like below:
my question is: how can I answer to the 2nd field and store it in my SPL "Product b" on the column "SN#"? Many thanks for your help! 😉
btw. I am open to hear suggestions/alternative to my business scenario. Thanks in advanced.
Solved! Go to Solution.
Hi @Corleone ,
Of course, the Patch function could achieve your needs. Do you add two Text Input boxes inside each data card in your Edit form, each Text Input box should be patched to different SP Lists?
I agree with @WarrenBelz 's thought almost. You could execute two Patch function in your "Submit" button. Each Patch formula is related to individual SP List.
Please take a try with the following workaround:
Set the OnSelect property of the "Submit" button to following:
Concurrent(
Patch(
'Product a',
Defaults('Product a'),
{
Title: TitleTextBox_1.Text,
'SN#': SNTextBox_1.Text,
...
}
),
Patch(
'Product b',
Defaults('Product b'),
{
Title: TitleTextBox_2.Text,
'SN#': SNTextBox_2.Text,
...
}
)
)
Note: The SNTextBox1 and SNTextBox2 are both Text Input boxes inside your SN# field data card. The SNTextBox1 value is patched to your 'Product a' List, SNTextBox2 value is patched to your 'Product b' List.
Within above two Patch formula, you need to reference corresponding TextInput box values inside the data cards of your Edit form.
Best regards,
Hi @Corleone ,
The Patch or UpdateIf statements will allow updating of any connected data source providing you can identify the relevant record requiring updating. Happy to assist with specific code if you get stuck.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @Corleone ,
Do you want to create same record in your Product B List once you submit a new entry into your Product A through the main form (Edit form)?
Based on the needs that you mentioned, I think it is not necessary to add a additional Text Input control inside the "SN#" data card, instead, I think the Patch function could achieve your needs.
I have made a test on my side, please consider take a try with the following workaround:
Set the OnSuccess property of the Main Form (EditForm1) to following:
Patch( // Add this formula to add duplicate record into your Product B List
'Product B',
Defaults('Product B'),
{
Title: EditForm1.LastSubmit.Title,
SN#: EditForm1.LastSubmit.SN#,
...
}
);
Back()
Please consider take a try with above solution, then check if the issue is solved.
Best regards,
Thank you @v-xida-msft for the elaboration.
@Corleone as I mentioned, happy to assist with code when you provide specific examples of what you need.
Hi @Corleone ,
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @v-xida-msft , @WarrenBelz
I don't want to duplicate the same record.
only the question is the same, whereas the record is different and my goal is to answer both forms at the same time.
is that possible?
thanks!
Hi @Corleone ,
Yes - as I mentioned, you could simply do two Patch statements, one to each list.
Hi @Corleone ,
Of course, the Patch function could achieve your needs. Do you add two Text Input boxes inside each data card in your Edit form, each Text Input box should be patched to different SP Lists?
I agree with @WarrenBelz 's thought almost. You could execute two Patch function in your "Submit" button. Each Patch formula is related to individual SP List.
Please take a try with the following workaround:
Set the OnSelect property of the "Submit" button to following:
Concurrent(
Patch(
'Product a',
Defaults('Product a'),
{
Title: TitleTextBox_1.Text,
'SN#': SNTextBox_1.Text,
...
}
),
Patch(
'Product b',
Defaults('Product b'),
{
Title: TitleTextBox_2.Text,
'SN#': SNTextBox_2.Text,
...
}
)
)
Note: The SNTextBox1 and SNTextBox2 are both Text Input boxes inside your SN# field data card. The SNTextBox1 value is patched to your 'Product a' List, SNTextBox2 value is patched to your 'Product b' List.
Within above two Patch formula, you need to reference corresponding TextInput box values inside the data cards of your Edit form.
Best regards,
Hi @Corleone ,
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
User | Count |
---|---|
119 | |
86 | |
83 | |
74 | |
69 |
User | Count |
---|---|
215 | |
179 | |
140 | |
109 | |
83 |