My version of Desktop is suddenly producing errors when I amend or create new flows
my untouched flows (which were built before PowerFX) are working OK
Example without PowerFX
I created a very simple test rig to debug the process
I create a variable MyVariable with a string value
I try to read that variable into second variable
%MyVariable%
I get an error.
Message = Object reference not set to an instance of an object.
Error = System.NullReferenceException
Full text = System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Flow.RPA.Desktop.Designer.Core.DesignerProgram.Statements.PowerFx.PowerFxVariableUsagesVisitor.ContainsVariableInExpression(PowerFxExpression expression)
at Microsoft.Flow.RPA.Desktop.Designer.Core.DesignerProgram.Statements.PowerFx.PowerFxVariableUsagesVisitor.Visit(PowerFxExpression expression)
at Microsoft.Flow.RPA.Desktop.Designer.Core.DesignerProgram.Statements.PowerFx.PowerFxVariableUsagesVisitor.Apply(IEvaluatableContext root)
at Microsoft.Flow.RPA.Desktop.Designer.Core.DesignerProgram.Statements.PowerFx.VariableUsagesStatementVisitor.Apply(IStatement statement, IEvaluatableContext expression)
at Microsoft.Flow.RPA.Desktop.Robin.Language.Contexts.Statements.Visitors.StatementVisitor.Visit(IAssignStatement statement)
at Microsoft.Flow.RPA.Desktop.Common.Structures.Extensions.EnumerableExtensions.ForEach[T](IEnumerable`1 en, Action`1 action)
at Microsoft.Flow.RPA.Desktop.Designer.Core.DesignerProgram.Statements.PowerFx.VariableUsagesStatementVisitor.FindUsages(IEnumerable`1 statements)
at Microsoft.Flow.RPA.Desktop.Designer.Core.DesignerProgram.Statements.StatementListTraverser.<>c__DisplayClass15_0.<FindStatementsWithVariables>b__0(String variable)
at Microsoft.Flow.RPA.Desktop.Common.Structures.Extensions.EnumerableExtensions.ForEach[T](IEnumerable`1 en, Action`1 action)
at Microsoft.Flow.RPA.Desktop.Designer.Core.DesignerProgram.Statements.StatementListTraverser.FindStatementsWithVariables(ISet`1 variableNames, String subflowName)
at Microsoft.Flow.RPA.Desktop.Designer.Core.DesignerProgram.ProgramFacade.GetVariableUsages(String subflowName, ISet`1 variableNames, IStatementListFacade statementListFacade, StatementsLookup statementsLookup)
at Microsoft.Flow.RPA.Desktop.Designer.Core.DesignerProgram.ProgramFacade.GetUsedFlowVariables(String subflowName, IReadOnlyList`1 programItems)
at Microsoft.Flow.RPA.Desktop.Designer.Core.DesignerProgram.FunctionFacade.GetUsedFlowVariables(IReadOnlyList`1 programItems)
at Microsoft.Flow.RPA.Desktop.Designer.Core.DesignerProgram.FunctionFacade.GetUsedFlowSensitiveVariables(IReadOnlyList`1 programItems)
at Microsoft.Flow.RPA.Desktop.Designer.Core.DesignerProgram.Functions.Actions.UpdateProgramItemAction.Do()
at Microsoft.Flow.RPA.Desktop.Designer.Core.DesignerProgram.Functions.Actions.ActionsHistory.Do(IAction action)
at Microsoft.Flow.RPA.Desktop.Designer.Application.DesignerProgram.ProgramItems.Commands.UpdateProgramItemCommandHandler.Handle(UpdateProgramItemCommand request, CancellationToken cancellationToken)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.<Handle>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.<Handle>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Flow.RPA.Desktop.Designer.UI.FunctionsArea.ViewModels.FunctionViewModel.<EditActionAsync>d__105.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
With PowerFX I store Get Special Folder (Document) which works ok and stores a string with my documents path
I cannot find a way to concatenate a variable containing the path with a text string. (tried all manner of options).
For other variables $ at start and {variable name} works but not if the variable was created by Get Special Folder