How would I include the first category slug in the section's entry URL format? I have a custom section that uses routes like this:

/section/category/entry_url

In trying to program the search form results I realized that I need to explicitly define the entry URL format for the section so that the search results return the proper links to view the entries.

Currently I have /section/{category.slug}/{slug} but it is not working.

How would I set the entry URL format to include only the first category slug of the entry?

Thanks.
This got it working for me:

/section/{categoryFieldName.first.slug}/{slug}