Cannot use hole_cards

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Cannot use hole_cards

Postby 4StarGen » Mon Jul 14, 2025 9:16 am

I've tried to build a stat based on whether I have info on the hole cards or not, for some reason, when hole_cards is empty the "no cards" isn't triggered. It is a varchar, so should be empty

Code: Select all
string_agg(
    CASE
        WHEN lookup_hole_cards.hole_cards != '' THEN lookup_hole_cards.hole_cards
        WHEN lookup_hole_cards.hole_cards = '' THEN 'no cards'
        ELSE NULL
    END,
    ','
) 
4StarGen
 
Posts: 1019
Joined: Sat Mar 08, 2014 6:58 am

Re: Cannot use hole_cards

Postby Flag_Hippo » Tue Jul 15, 2025 5:44 am

Can you please provide more details about this custom statistic you are building and what you want as the end result.
Flag_Hippo
Moderator
 
Posts: 17060
Joined: Tue Jan 31, 2012 7:50 am

Re: Cannot use hole_cards

Postby 4StarGen » Tue Jul 15, 2025 5:59 am

The end goal is to retrieve the hole cards in some specific spots, I play on Ignition so flg_showdown won't going to help since I can download hands after a day and even if I didn't go to the showdown, the hole_cards field is filled with the correct information

For example
Code: Select all
string_agg(
    CASE
        WHEN -- add condition
        THEN  (cash_hand_player_statistics.amt_p_raise_made / cash_limit.amt_bb) ::double precision::text || ' (' || lookup_hole_cards.hole_cards || ')'
        ELSE NULL
    END,
    ','
) 


This retrieves hole cards correctly ONLY if the hole_cards field is not empty, when it is empty the query failed, or at least the stat doesn't show up nor in the reports or HUD. So I'm trying to detect before whether the field is empty or not
4StarGen
 
Posts: 1019
Joined: Sat Mar 08, 2014 6:58 am

Re: Cannot use hole_cards

Postby Flag_Hippo » Wed Jul 16, 2025 5:41 am

You can test that hole cards are known with:

Code: Select all
cash_hand_player_statistics.id_holecard > 0
Flag_Hippo
Moderator
 
Posts: 17060
Joined: Tue Jan 31, 2012 7:50 am

Re: Cannot use hole_cards

Postby 4StarGen » Wed Jul 16, 2025 5:56 am

Fantastic ty, gonna give it a try in a few hours
4StarGen
 
Posts: 1019
Joined: Sat Mar 08, 2014 6:58 am


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 23 guests