Custom Fields - Error message

Is there a way to control “fail” messaging displayed to the user when using Remote Options URL with custom fields.

It seems the only options are to return nothing (which displays small white dot to user" or fail with return code = 4xx or 5xx which then displays “Failed to load options”

Hi @JCorrell

Another option would be to check for the failure in the remote options URL and return something like [{tilte: "reason for the fail", value: null}]

Off course then your code depending on the value of the item should check for that null value.

@basdebruin

Thanks for the input.

Definitely an option to consider.

Hey @JCorrell,

That’s a curious one :slight_smile:

To confirm my understanding here, are you looking to display an error message for the user when tehy are setting up your recipe for the first time, and the Custom Field isn’t loading options? For example, from a dependency you asked the user to select a GitHub repo, to show pull requests, but there are none for the custom field to load?

If so, I’m afraid changing the “failed to load options” text is not possible, but I think @basdebruin suggestion could make sense here.

I’d love to learn more about your use case to see if we’re on track so far.

-Alex

P.S: Thanks for the great suggestion, Bas :slight_smile:

@AlexSavchuk

Yes, you are understanding correctly. The specific use case that I was investigation was to get the user to pick a formula column. Since that is not available in the column picker… but I wanted a better message when there are none on the board.

@JCorrell

Got it! Thank you for confirming.

I suppose in that case, Bas’s solution would be your best bet here, unfortunately. I was thinking it might make sense to try and show a dummy option like “Create Formula column”, but you wouldn’t have a token to use to run a “create_column” mutation before the recipe is added.

I’ll add this as a feature suggestion to our product team, but likely, this won’t be implemented in the nearest future.

-Alex

Yes, having the ability to add a column right then would be be best!

Technically you can create a new column in the remote options URL (you have the shortLivedToken). The issue is that the user can’t reselect when you add that column to your return array because the endpoint will be called only once.

You should be able to create a column (random name, which is the same as columnid) and in your subscribe endpoint take that columnid as your formula column. Not ideal, but (I think) the close you can get.

1 Like