cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JJMA
Level: Power Up

How to capture selected value from Toggle Control within a Flow Run Function

Hello,

 

I'm fairly new to PowerApps and hoping that htis question/scenario might be a something straight forward that I am missing.

 

Scenario:

I am setting up a canvas app that is connected to a D365 database, where a User will answer questions. These answers are then gathered and, using a Flow, are used to populate a new Account record in D365.

 

Issue:

The screen that I have created contains several Toogle Controls. Once the User has filled in all the fields and made a selection on the Toggle Controls, they then click a Check button. The check button kicks off a .Run Flow which will then collect all these answers. The Flow is setup correctly with all the "Ask in PowerApp" nodes setup". When testing this, the subsequent Account record is created, and all the selections are populating wihtin that record correctly, except the Toggle items. Below are some screen shots to help illustrate:

 

Screencapture of Canvas App with Toggle Controls

Screenshot 1.jpg

 

2 Toggle Controls are selected

Screenshot 2.jpg

 

Screencapture of Account record created in D365

Screenshot 3.jpg

 

The expected values that should be displayed 

Screenshot 4.jpg

 

Here is how the .Run function has been setup (the blue font items are the toggle control references):

CreateNewEBPAccountButton.Run(DataCardValue2_3,DataCardValue9_3,DataCardValue3_3,DataCardValue18_2,DataCardValue11_3,DataCardValue1_2,DataCardValue17_3,DataCardValue10_3,DataCardValue30,DataCardValue31,DataCardValue32,DataCardValue33,DataCardValue34,DataCardValue35)

 

Thank you and appreciate your time and thoughts on this question

 

4 REPLIES 4
Super User
Super User

Re: How to capture selected value from Toggle Control within a Flow Run Function

Where is the part that you are referring to the Toggle into Flow?

 

I see your code you said carries over to your flow but don't see the Toggles mentioned....do you have the value of that pulling into a hidden text field or something? The toggle value will not be a "DataCardValue" unless you have the data card value pulling from the toggle selection.

JJMA
Level: Power Up

Re: How to capture selected value from Toggle Control within a Flow Run Function

Hi rebeccas,

 

Thank you for responding! The toggle comands are nested within DataCards. Attached is a screenshot focused on how the "Defined Beneift" Toggle has been setup. "DataCardValue32" is the toggle in this case and resides within the "EBP Type: Defined Benefit_DataCard1" DataCard.

 

WIthin the .run flow function, I tried adding ".selected" ".value" and various combinations of those attached to the datacard value but no luck. I think the issue is within the syntax and not building the reference out properly. I am not quite sure though.

JJMA
Level: Power Up

Re: How to capture selected value from Toggle Control within a Flow Run Function

Oops. Attached here.

Super User
Super User

Re: How to capture selected value from Toggle Control within a Flow Run Function

A Toggle will be .Value and that will give you true or false. 

 

When I am trying to trouble shoot stuff like this I typically put in text box and set it to Toggle1.Value and make sure I see what I should and then make sure that text value will pull in correctly and then change it back to the Toggle.

 

If you have it set to pullin the Toggle.Value I can't think of what the issue could be but the part above is a good way to work through figuring it out.

 

Let me know if you think of anything else on it I could maybe help give input on....more help than this..lol. 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 40 members 4,387 guests
Please welcome our newest community members: