cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nchandran
Helper V
Helper V

Need help to match value between input and sharepoint then populate radio buttons.

Hi,

Can someone help me, i have a powerapp form text input which when submitted falls nicely in database A. This input needs to be compared with a measurement criteria database b item.

In short there are three problem i'm facing

1) upon submit the system should calculate if the user input is lesser than database B item then reveal a radio selection and set it to fail and display a label sentence "u passed please go next item" . At the same time it will set checkbox in diagram to weld repair.

2) if the input is greater than database B we are supposed to toggle to (pass) button and reveal a another set of toggle button.

3) last toggle question should reveal a sentence with a calculation field under skim cut value where user input minus database b divide 2.

I got some screenshots here to show you what i actually wanted.

problem to compare ac and reveal combo box.jpgdata b.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @nchandran ,

Do you want to compare the user input (Line Item 1 Text Box) with the ACLineitem1 column in your data base B (a SP List)?

Is there only one record existed in your data base B?

 

Based on the issue that you mentioned, I think If function could achieve your needs. Please take a try with the following workaround:

Set the OnSelect property of the "Submit"  button to following:

Set(
SubmittedLineItem1,
Patch('Your Database A', Defaults('Your Database A'), {LineItem1Column: Value('Line Item 1'.Text)})
)

Note: The LineItem1Column represents the number column in your database A, which used to store the Line Item 1 text box (User Input).

Set the Default property of the Radio control to following:

If(
   !IsBlank(SubmittedLineItem1) && SubmittedLineItem1.LineItem1Column < First('Your database B').ACLineitem1,
   "Fail",
   !IsBlank(SubmittedLineItem1) && SubmittedLineItem1.LineItem1Column > First('Your database B').ACLineitem1,
   "Pass"
)

Add a Label (Label1), set the Text property to following:

"u passed please go next item"

set the Visible property to following:

If(Radio1.Selected.Value = "Fail", true, false)

Set the Default property of the "Weld Repair + machine" Checkbox to following:

If(
Radio1.Selected.Value = "Fail", true,
Radio1.Selected.Value = "Pass", false
)

Set the Default property of the "Skimcut" Checkbox to following:

If(
   Radio1.Selected.Value = "Pass", true, 
   Radio1.Selected.Value = "Fail", false
)

 

Add aother Label (Label2) under the "Skimcut" Checkbox, set the Text property to following:

"The calculation value is " &  SubmittedLineItem1.LineItem1Column - First('Your database B').ACLineitem1/2

set the Visible property of the Label2 to following:

If(
   Radio1.Selected.Value = "Pass",
true,
false )

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xida-msft
Community Support
Community Support

Hi @nchandran ,

Do you want to compare the user input (Line Item 1 Text Box) with the ACLineitem1 column in your data base B (a SP List)?

Is there only one record existed in your data base B?

 

Based on the issue that you mentioned, I think If function could achieve your needs. Please take a try with the following workaround:

Set the OnSelect property of the "Submit"  button to following:

Set(
SubmittedLineItem1,
Patch('Your Database A', Defaults('Your Database A'), {LineItem1Column: Value('Line Item 1'.Text)})
)

Note: The LineItem1Column represents the number column in your database A, which used to store the Line Item 1 text box (User Input).

Set the Default property of the Radio control to following:

If(
   !IsBlank(SubmittedLineItem1) && SubmittedLineItem1.LineItem1Column < First('Your database B').ACLineitem1,
   "Fail",
   !IsBlank(SubmittedLineItem1) && SubmittedLineItem1.LineItem1Column > First('Your database B').ACLineitem1,
   "Pass"
)

Add a Label (Label1), set the Text property to following:

"u passed please go next item"

set the Visible property to following:

If(Radio1.Selected.Value = "Fail", true, false)

Set the Default property of the "Weld Repair + machine" Checkbox to following:

If(
Radio1.Selected.Value = "Fail", true,
Radio1.Selected.Value = "Pass", false
)

Set the Default property of the "Skimcut" Checkbox to following:

If(
   Radio1.Selected.Value = "Pass", true, 
   Radio1.Selected.Value = "Fail", false
)

 

Add aother Label (Label2) under the "Skimcut" Checkbox, set the Text property to following:

"The calculation value is " &  SubmittedLineItem1.LineItem1Column - First('Your database B').ACLineitem1/2

set the Visible property of the Label2 to following:

If(
   Radio1.Selected.Value = "Pass",
true,
false )

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thank you kris.


@v-xida-msft wrote:

Hi @nchandran ,

Do you want to compare the user input (Line Item 1 Text Box) with the ACLineitem1 column in your data base B (a SP List)?

Is there only one record existed in your data base B?

 

Based on the issue that you mentioned, I think If function could achieve your needs. Please take a try with the following workaround:

Set the OnSelect property of the "Submit"  button to following:

Set(
SubmittedLineItem1,
Patch('Your Database A', Defaults('Your Database A'), {LineItem1Column: Value('Line Item 1'.Text)})
)

Note: The LineItem1Column represents the number column in your database A, which used to store the Line Item 1 text box (User Input).

Set the Default property of the Radio control to following:

If(
   !IsBlank(SubmittedLineItem1) && SubmittedLineItem1.LineItem1Column < First('Your database B').ACLineitem1,
   "Fail",
   !IsBlank(SubmittedLineItem1) && SubmittedLineItem1.LineItem1Column > First('Your database B').ACLineitem1,
   "Pass"
)

Add a Label (Label1), set the Text property to following:

"u passed please go next item"

set the Visible property to following:

If(Radio1.Selected.Value = "Fail", true, false)

Set the Default property of the "Weld Repair + machine" Checkbox to following:

If(
Radio1.Selected.Value = "Fail", true,
Radio1.Selected.Value = "Pass", false
)

Set the Default property of the "Skimcut" Checkbox to following:

If(
   Radio1.Selected.Value = "Pass", true, 
   Radio1.Selected.Value = "Fail", false
)

 

Add aother Label (Label2) under the "Skimcut" Checkbox, set the Text property to following:

"The calculation value is " &  SubmittedLineItem1.LineItem1Column - First('Your database B').ACLineitem1/2

set the Visible property of the Label2 to following:

If(
   Radio1.Selected.Value = "Pass",
true,
false )

Please take a try with above solution, check if the issue is solved.

 

Best regards,


 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,903)