Hi all,
I created a macro that connects to our SharePoint Online instance and generates a list of files and folders in a particular folder. At the end of the workflow, I added a drop down to allow users to filter the results: Both Files & Folders, Files Only, or Folders Only. In my data stream, I have a variable [type] which is indicates if it is a file or folder, and this is what I would like to filter on. Unfortunately after a few different attempts, I'm not sure how to construct my formula.
I attached a simple version of this workflow and was hoping someone could take a look at it for me.
I tried using the following formulas in the action tool and wrote this:
IF [#1]="both" THEN
1
ELSEIF [#1] = "files" THEN
"[type] = files"
ELSEIF [#1] = "folders" THEN
"[type] = folders"
ELSE
0
ENDIF
It doesn't seem right that I put [type] in quotes
IF [#1]="both" THEN
1
ELSEIF [#1] = "files" THEN
[type] = "files"
ELSEIF [#1] = "folders" THEN
[type] = "folders"
ELSE
0
ENDIF
Both of these formulas failed, and I'm not sure what other steps I can take to resolve this.
EDIT:
I decided to go another route and set the value of the drop down to a variable, then that way I could use [type] in my formula, but now I'm getting error messages about how "both" is an unknown variable. Maybe it's the formula/drop down list that messing me up. This attempt is formula macro2.yxzp