Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Spartan27215
Partner - Creator
Partner - Creator

Loop And Reduce

I am trying to create a "Loop And Reduce" Automation in SaaS/Cloud but unsure the steps to take. The support articles really don't help because they use a lot of Json and merging of variables etc. which I am unsure of why I need these. I already have a Field in my application that will be used to reduce on and I already have the Managed Spaces created using the same field values from that field. According to some instructions on the block itself I should use "Publish App to Managed Space" which will either create or republish app to the same name. I cannot find any documentation on this block to figure out how to fill in the appropriate input fields with the correct values. Looks like I can only choose and App Id or Reduced Value as input from the Loop And Reduce Block which will not cover all of the fields that need to be filled in. 

The fields on the "Publish App to Managed Space" are:

Exported App Id: I set this to the App Id From the Reduce Loop

Name: I set this to the Reduce Value of the reduce Loop. but unsure if I want my App named this..

Public Sheets: Set to the Public Sheets value from the Reduce Loop.

Space Id: This is where I am lost, my space is already created with the "Name" which would correspond to the Reduced Value, so why can't it find it by that value. Do I have to now do some type of app name to Id lookup? what happens if it does not exist? Are there options here

Run Mode: Pretty straight forward

Since there is no documentation on this. I guess it's "try it" and see what happens and try to interpret errors as they occur. 

Labels (2)
1 Solution

Accepted Solutions
Spartan27215
Partner - Creator
Partner - Creator
Author

Looks like I solved my own issue so I will post how I did it here... To solve the App Id situation from my original post, I had to add 2 additional blocks, one to list spaces, and the other to filter the spaces based on the Result Value of the Loop and Reduce which is the space name. I can then use the result of the filter as the App Id in the loop and reduce, refer to the attached diagram and publish block is filled out as follows...

Exported App Id: I set this to the App Id From the Reduce Loop

Name: I set this to the Reduce Value of the reduce Loop. but unsure if I want my App named this..

Public Sheets: Set to the Public Sheets value from the Reduce Loop.

Space Id: This is where I am lost, my space is already created with the "Name" which would correspond to the Reduced Value, so why can't it find it by that value. Do I have to now do some type of app name to Id lookup? what happens if it does not exist? Are there options here

Exported App Id: I set this to the App Id From the Reduce Loop

Name: I set this to the Reduce Value of the reduce Loop. but unsure if I want my App named this..

Public Sheets: Set to the Public Sheets value from the Reduce Loop.

Space Id: Set to the Filter List -> Item -> Id value

Run Mode: republish by name

View solution in original post

1 Reply
Spartan27215
Partner - Creator
Partner - Creator
Author

Looks like I solved my own issue so I will post how I did it here... To solve the App Id situation from my original post, I had to add 2 additional blocks, one to list spaces, and the other to filter the spaces based on the Result Value of the Loop and Reduce which is the space name. I can then use the result of the filter as the App Id in the loop and reduce, refer to the attached diagram and publish block is filled out as follows...

Exported App Id: I set this to the App Id From the Reduce Loop

Name: I set this to the Reduce Value of the reduce Loop. but unsure if I want my App named this..

Public Sheets: Set to the Public Sheets value from the Reduce Loop.

Space Id: This is where I am lost, my space is already created with the "Name" which would correspond to the Reduced Value, so why can't it find it by that value. Do I have to now do some type of app name to Id lookup? what happens if it does not exist? Are there options here

Exported App Id: I set this to the App Id From the Reduce Loop

Name: I set this to the Reduce Value of the reduce Loop. but unsure if I want my App named this..

Public Sheets: Set to the Public Sheets value from the Reduce Loop.

Space Id: Set to the Filter List -> Item -> Id value

Run Mode: republish by name