• Resolved HaythemT

    (@haythemt)


    We are using FSQM pro to make an employee survey – results are stored in an SQL database, one of the answers in the employee survey is a bonus. The bonus is being stored as “freetype” in the SQL as it isn’t one of the default options of the survey and is being calculated from entries of multiple fields. We basically need a way of exporting the final bonus figure. We tried using “Exports and Reports” that using the SQL statement to export the “freetype” data to a report, but it just exports a big block of code (with the figures inside) See here and here

    anyone know of a way of getting the final bonus value out of the “freetype” column?

    Thanks

    https://wordpress.org/plugins/exports-and-reports/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    Can you send me an example value for this column as its displayed? You can send it to lol (@) scottkclark (.) com

    Thread Starter HaythemT

    (@haythemt)

    Hi Scott…Sorry, what do you mean by as its displayed? the 2 links are screenshots from the SQL database and the report that I created exporting that SQL data (freetype). Or did you mean from the users end – when they input it?

    Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    Sorry, the links didn’t come through e-mail, will check them out.

    Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    You can create a PHP function and use it for your display function on the field. A function like this:

    function my_freetype_display( $value ) {
    
        $types = array();
    
        $value = maybe_unserialize( $value );
    
        if ( is_array( $value ) ) {
            foreach ( $value as $type_value ) {
                $types[] = $type_value['value'];
            }
        }
    
        echo implode( ', ', $types );
    
    }
    Thread Starter HaythemT

    (@haythemt)

    PHP isn’t my strong suit, is this going in the exports-and-reports.php? Also when you say display function do you mean within the “manage reports” part of wordpress?

    Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    This goes into your custom theme or a plugin, you may even add it to wp-content/mu-plugins/my-custom-code.php

    The display function can be set when editing a report, in the field row of options for each field.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Exporting from FSQM Pro’ is closed to new replies.