LightningFlowComponents icon indicating copy to clipboard operation
LightningFlowComponents copied to clipboard

Capture value/assign value to variable on NavigationButtonFSC click

Open Seanman236 opened this issue 8 years ago • 3 comments

I haven't found a way to tell the flow to assign a value to a variable (or just generate a specific output) when the user has clicked a navbutton. The goal would be to use that input in a decision element to direct the user within the flow. Right now this can be done by offering a checkbox - which works okay - but it's a little less elegant than just clicking a button and immediately being directed.

If context helps - A specific example I was working with was to offer a "need help?" button nested in the bottom of each flow screen. If the user clicked it, they would be directed down a path where a screen uses a knowledgearticleFSC to displays a specific knowledge article for the previous flow screen (and offer voting ability etc).

If the navbutton could be configured to output any "x" value to a single variable on click - it would be open up a lot of options.

I was able to get the input/output easily enough in the component and design resource but wasn't sure how to get the controller to assign a value onclick. (I am very very new to javascript so forgive me if this is really simple).

Is it possible to do this (or is there a better way to go about this)?

Thanks!

Seanman236 avatar Nov 19 '18 19:11 Seanman236

Hi @Seanman236 . I upgraded the component to do what you want. See https://sites.google.com/view/flowunofficial/flow-screen-components/navigation-button There's a video in the documentation and you can look at the source and see how it's done.

alexed1 avatar Nov 22 '18 20:11 alexed1

Thank you so much! Will take a look at the changes :). Happy Thanksgiving Sir!

On Thu, Nov 22, 2018 at 12:34 PM Alex Edelstein [email protected] wrote:

Hi @Seanman236 https://github.com/Seanman236 . I upgraded the component to do what you want. See https://sites.google.com/view/flowunofficial/flow-screen-components/navigation-button There's a video in the documentation and you can look at the source and see how it's done.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alexed1/LightningFlowComponents/issues/88#issuecomment-441116342, or mute the thread https://github.com/notifications/unsubscribe-auth/AV_nXsdYAjLNOGRMZKV_WEajxC0UK3lrks5uxwpHgaJpZM4YpwEz .

-- Sean Malinoski 202-591-5505

Seanman236 avatar Nov 22 '18 21:11 Seanman236

Hi Alex,

I've been trying unsuccessfully to extend this same functionality to the imagebuttonFSC. I didn't have any issue with getting the component and design set up but I am having an issue with getting the value to set on click.

I tried applying the change you made to the navbuttonFSC controller to the HandleClick function in the ImagebuttonFSC but it caused the buttons to stop accepting click input altogether in testing. When I tried to apply it to the helper, I just ended up with an infinitely spinning component.

Suffice it to say - I am doing something wrong. The ImageButtonFSC seems structured differently and looks a bit more complex - is it possible to apply the same functionality to this component?

Seanman236 avatar Nov 28 '18 00:11 Seanman236