How to Set Outputs to document properties in Spotfire?

I'm executing this basic data function using R Script. 

guide.page <- gsub(" ","", guide.page)
base.path <- paste0("/data/", guide.area,"/", guide.name,"/", guide.page, "/", guide.page, ".html")
if(file.exists(base.path))
{
	sucess <- "File Exists"
}else
{
	sucess <- "File Does not Exists"
}

I know how inputs are worked  but i'm trying to set the document property of "sucess." 

I have the output defined.

 OutputParameterBuilder sucessMessage = new OutputParameterBuilder("sucess", ParameterType.Value);
          OutputParameter sucessOutput = sucessMessage.Build();

and then pretty much trying to add the document property and update the value. 

myFunction.Outputs.SetDocumentPropertyOutput(sucessOutput, "sucess");

My problem is that the document property is not added at all. What am i doing wrong?

 

(1) Answer

Login