• Resolved geqora

    (@geqora)


    Hello,

    I want import/add daily manually created XLSX files that contains different user id’s with different information’s and filter table by currenty logged user id’s to show customers only their own information.
    Is it any way to do that?

    Please help.

Viewing 10 replies - 31 through 40 (of 40 total)
  • Sim e a mesma tabela.
    Id=3

    Uma filtrada com user [table-user-filtered id=3 /]

    uma n?o filtrada [table-id=3 /]

    S?o a mesma tabela id=3

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    I have no idea why this happens, I’m really sorry ??

    Regards,
    Tobias

    Tá bem. Obrigado

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    I’m really sorry ??

    Best wishes,
    Tobias

    Sim e a mesma tabela.
    Id = 3

    Uma filtrada com user [ID filtrada pelo usuário da tabela = 3 /]

    uma n?o filtrada [table-id = 3 /]

    S?o a mesma tabela id = 3

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    I understand. Unfortunately, the filtering removes the header row because it does not contain the filter word, it looks like…

    I don’t know a solution here, sorry.

    Regards,
    Tobias

    posso fazer uma filtragem dupla ent?o. que ai coloco algo que tenha no cabe?alho de forma fixa. ou seja, sempre irá aparecer

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, that could be an idea. You would have to use something like

    filter="...||HEADER"
    

    and HEADER needs to be in the header row.

    Regards,
    Tobias

    Ficaria assim?

    add_shortcode( ‘table-user-filtered’, ‘formfunia_tablepress_filtered_table’ );
    function formfunia_tablepress_filtered_table( $atts ) {
    if ( ! is_user_logged_in() ) {
    return ‘Error: No user is logged in.’;
    }
    $current_user = wp_get_current_user();
    $username = $current_user->user_login;
    $atts[‘filter’] = $username;
    $atts[‘cache_table_output’] = false;
    $atts[‘filter_full_cell_match’] = true;
    $atts[filter=”…||name”‘]
    return tablepress_get_table( $atts );
    }

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no, that was just an example ??
    You need to change

    $atts[‘filter’] = $username;
    

    to

    $atts[‘filter’] = $username . '||HEADER';
    

    Regards,
    Tobias

Viewing 10 replies - 31 through 40 (of 40 total)
  • The topic ‘TablePress-Show only table rows that contain current logged in user id.’ is closed to new replies.