Page 1 of 1
Using model information in a controller(Calendar)
Posted: March 3rd, 2022, 3:08 pm
by Toyeyemi
Hi everyone,
I'm having an issue where the variables that I created in the model aren't being passed to my calendar controller. Shown below is the setup for my controller/widget
- widget-setup.png (167.28 KiB) Viewed 1146 times
- widget-setup.png (167.28 KiB) Viewed 1146 times
When checking the logs, I can see that my model is properly generating information
- toDisplay_logs.png (122.47 KiB) Viewed 1146 times
- toDisplay_logs.png (122.47 KiB) Viewed 1146 times
But when I check the logs for the calendar, it seems like no information is being passed over
- Calendar_logs.png (134.88 KiB) Viewed 1146 times
- Calendar_logs.png (134.88 KiB) Viewed 1146 times
Is there something that I'm missing here?
Re: Using model information in a controller(Calendar)
Posted: March 3rd, 2022, 4:42 pm
by SteveCap
Your setup is correct. We have task #10186 created for this issue, this post will be updated When a task is implemented.
Re: Using model information in a controller(Calendar)
Posted: March 4th, 2022, 9:45 am
by JefferyD
It looks like you're trying to pull the value from a submethod instead of the model. Can you check the submethod call for the value in "Classic"? If it's "False", then make sure that you have "toDisplay" configured in the "Outputs".
Example:
- submethod_classic.png (37.59 KiB) Viewed 1139 times
- submethod_classic.png (37.59 KiB) Viewed 1139 times
Re: Using model information in a controller(Calendar)
Posted: March 4th, 2022, 10:31 am
by Toyeyemi
I recently made the change to my submethod recommended by Jeffery, that being to include toDisplay in the submethod's output.
- GetMinMax_Output.png (32.34 KiB) Viewed 1135 times
- GetMinMax_Output.png (32.34 KiB) Viewed 1135 times
This leaves me with another question: How should I access this new output? Up until now I've just been making use of services that expose their outputs to the main canvas and working from there. But when I look into the area where I would usually see this information, I cannot see the output for GetMinMax, only the exposed output from my original toDisplay service and other outputs from exposed services.
- Model-Outputs.png (61.56 KiB) Viewed 1135 times
- Model-Outputs.png (61.56 KiB) Viewed 1135 times
Should I be looking somewhere else?
Re: Using model information in a controller(Calendar)
Posted: March 4th, 2022, 2:59 pm
by JefferyD
The new way exposed outputs work is that you have to define them in the "Outputs" section of the method call. An output for each exposed service would need to be defined, and that service node is pulled out of the node of the method. Hopefully this makes sense.
From a model, calling a method like this:
- Method
- Service1 (Exposed and output defined)
- Service2 (Exposed and output defined)
- Service3 (Exposed and output not defined)
- Service4 (Not exposed)
Results in:
If you want something returned automatically or from the method call service itself, then it must be placed into a MethodOutput service at the end of the method being called.
From a model, calling a method like this:
Results in:
Re: Using model information in a controller(Calendar)
Posted: April 25th, 2023, 11:58 am
by JustinVanRegenmorter
The issue above has been resolved in an earlier revision.