• Resolved robipears

    (@robipears)


    Hi All,

    We are trying to find out how to use (or if possible) CFF, to display the Warranty date according the entred Seruial number (I would like to link a serial equivalent to an invoice date and 2 results fields: +30 days (field 1) + 730 days (field 2).

    Thanks in advance for your supports

    Robi

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @robipears

    If you have the serial numbers and dates in a database, you will need the DS fields to read the information from the database. The DS fields, distributed with the Developer and Platinum plugin versions, read their values from external data sources, like a database, a CSV file, a JSON structure, previous submissions, ACF, and third-party services via server-side equations. Learn more about DS fields by reading the following blog post:

    https://cff.dwbooster.com/blog/2019/02/14/ds

    Now, assuming you read the date into the fieldname1, and it has the format dd/mm/yyyy, you can calculate the +30 days and +730 days by using the DATETIMESUM operation, combined with GETDATETIMESTRING to transform the result (date object) into a text with date format.

    Insert a calculated field in the form and enter the equation:

    GETDATETIMESTRING(DATETIMESUM(fieldname1, 'dd/mm/yyyy', 30, 'd'), 'dd/mm/yyyy')

    Insert another calculated field and enter the equation:

    GETDATETIMESTRING(DATETIMESUM(fieldname1, 'dd/mm/yyyy', 730, 'd'), 'dd/mm/yyyy')

    Learn more about the date/time operations module by reading the following section in the plugin documentation:

    https://cff.dwbooster.com/documentation#datetime-module

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘CALCULATE WARRANTY DATE’ is closed to new replies.