Getting ScheduleField from SchedulableField?

Based on this thread:

I have set things up so I can pull a list of scheduleable fields from an empty schedule and pick out the FieldIDs of the Fields I want to add to a Schedule Filter. But when I try to submit those Fields to the create filter block I get an error pointing out that the object I’m providing is not a ScheduleField but a SchedulableField.

I don’t see anything in the Dynamo library that would let me convert one to the other. Any ideas how I can do this?

My first reply in that thread should answer your question.

So in your first post, from SchedulableFields you have a codeblock that picks the fields by index. I have a couple extra steps but essentially have the same thing using GetItemAtIndex. Then you have List.Join, where I use List.Flatten.

I tried it with your choice of functions and I get the same error. The next thing that is different between ours is yours goes to an Add.Field which asks for Fields plural. Where mine goes to ScheduleFilter.ByFieldTypeAndValue which asks for Field singular. But when I extract the FieldIDs I want I only extract one ID so it should be just one field.

Exactly. You have to add the field to the schedule before you can create a filter for it.
Add the field to the schedule. Then get the ScheduledFields to create a filter.

1 Like