function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NikhilNikhil 

How to pass Flow name dynamically like <Flow:Interview name="!{!DynamicName}">

 

How to pass Flow name dynamically like <Flow:Interview name="!{!DynamicName}">

Hi guys!

 

Is it possible to pass Flow name dynamically like <Flow:Interview name="!{!DynamicName}">

 

Also 

 

Can we use a variable associated to flow without initiating a object of that flow in the controller.

 

<apex:page controller="ModemTroubleShootingCusto" >
<flow:interview name="TipCalculator" interview="{!myflow}">

{!TipCalculator.BillValue} is not working... how can i access this variable on page witout creating  interview="{!myflow}"
</flow:interview>
</apex:page>

 

 

Please provide some help here.

Thanks

Nikhil

RajaramRajaram

If you want to get variable values from a flow (not setting them), you will need to create a custom controller. 

So you will need something like 

 

<apex: page>

<flow:interview name="xyz" interview="{!myFlow}"/>

 

<apex:outputText value="{!BillValue}"/>

</apex:page>

 

and in the controller you have something like

public Flow.Interview.xyz myFlow {get; set;}

 

Public String getBillValue() {

if (myFlow==null) return '';

else return myFlow.BillValue;

 

}

 

Hope this helps..

 

NikhilNikhil

My query is a bit differnt..

 

I am asking for a way where i could pass the Flow File name dynamically rather passing it as a litral.

 

<Flow:Interview name ="xyz" >

 

So the question is ... is it possible to pas name = "{!flowFilename}" rather passing like name = "xyz"

RajaramRajaram

No the name attribute cannot be dynamic.

 

Can you let me know your use case or what  you are trying to achieve?