• Resolved kunzi

    (@kunzi)


    Hi,

    What should I put into Filter by Formula field in the Virtual Post settings if I want to only show data if the row has certain valuen in specified field?

    Something like:
    IF(FIELDNAME=CONTENT)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kunzi

    (@kunzi)

    And the answer is something like:

    {Fieldname} = 'Value'

    Next question is: Is this possible to achieve with shortcodes so that I would only require one Virtual Post Configuration?

    Plugin Author Chester McLaughlin

    (@chetmac)

    There is not currently a way filter results (i.e. to selectively choose certain rows) using shortcodes.

    You may specify your query criteria (filterByFormula, maxRecords, etc) either using PHP or using the VirtualPost configuration screen.

    Keep in mind that you can specify the VALUE and the FIELD in the VirtualPost configuration.

    For example, if your “URL Pattern to Match” is “^list/field/([^/]+)/value/([^/]+)/?$” and your Filter by Formula is “{$1} = ‘$2′” then it will match both example.com/list/field/Status/value/Maybe/ and /list/field/District/value/SoMa/

    So you can see how flexible your regular expressions can be.

    Regardless, you’ll typically want to use something that is URL compliance (all lowercase, no spaces and no other non-url characters).

    If you’re concerned about the number of VirtualPost configs you need to create you should probably just use PHP to configure it… or maybe there’s a more flexible way to use multiple parameters in your VirtualPost config.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Filter by Formula’ is closed to new replies.