Using model information in a controller(Calendar)

This forum allows users to post and respond to "How Do I Do ....." questions. The information contained in this forum has not been validated by K-Rise Systems and, as such, K-Rise Systems cannot guarantee the accuracy of the information.
Post Reply
Toyeyemi
Posts: 15
Joined: February 18th, 2022, 1:29 pm
Contact:

Using model information in a controller(Calendar)

Unread post 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
widget-setup.png (167.28 KiB) Viewed 1147 times
widget-setup.png
widget-setup.png (167.28 KiB) Viewed 1147 times
When checking the logs, I can see that my model is properly generating information
toDisplay_logs.png
toDisplay_logs.png (122.47 KiB) Viewed 1147 times
toDisplay_logs.png
toDisplay_logs.png (122.47 KiB) Viewed 1147 times
But when I check the logs for the calendar, it seems like no information is being passed over
Calendar_logs.png
Calendar_logs.png (134.88 KiB) Viewed 1147 times
Calendar_logs.png
Calendar_logs.png (134.88 KiB) Viewed 1147 times
Is there something that I'm missing here?
word count: 127

Tags:
SteveCap
Posts: 329
Joined: August 26th, 2021, 9:18 am
Contact:

Re: Using model information in a controller(Calendar)

Unread post by SteveCap »

Your setup is correct. We have task #10186 created for this issue, this post will be updated When a task is implemented.
word count: 22
JefferyD
Posts: 178
Joined: August 31st, 2021, 11:37 am
Contact:

Re: Using model information in a controller(Calendar)

Unread post 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
submethod_classic.png (37.59 KiB) Viewed 1140 times
submethod_classic.png
submethod_classic.png (37.59 KiB) Viewed 1140 times
word count: 62
Toyeyemi
Posts: 15
Joined: February 18th, 2022, 1:29 pm
Contact:

Re: Using model information in a controller(Calendar)

Unread post 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
GetMinMax_Output.png (32.34 KiB) Viewed 1136 times
GetMinMax_Output.png
GetMinMax_Output.png (32.34 KiB) Viewed 1136 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
Model-Outputs.png (61.56 KiB) Viewed 1136 times
Model-Outputs.png
Model-Outputs.png (61.56 KiB) Viewed 1136 times
Should I be looking somewhere else?
word count: 135
JefferyD
Posts: 178
Joined: August 31st, 2021, 11:37 am
Contact:

Re: Using model information in a controller(Calendar)

Unread post 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:
  • Model
    • Method
    • Service1
    • Service2

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:
  • Method
    • MethodOutput
      • Values1
      • Values2
Results in:
  • Model
    • Method
      • Values1
      • Values2
word count: 131
JustinVanRegenmorter
Posts: 572
Joined: August 26th, 2021, 9:56 am
Contact:

Re: Using model information in a controller(Calendar)

Unread post by JustinVanRegenmorter »

The issue above has been resolved in an earlier revision.
word count: 10
Post Reply