Using multiple columns as primary key [ or key columns] in pulldata()

My fellow ODKians,
Hope everyone is having an amazing week. I am slightly lost in finding a way to use multiple key cols in pulldata. A simple usecase is: Pulling firstname from 'household csv', key columns are: 'member_num' and 'member_id'.
pulldata query would look like" pulldata('household_csv', 'member_key', 'fname', ${ODK_value})
where member_key = member_num and member_id.

However, this is not possible in given constraints for pulldata from xlsform or odk official documentation.
Is there a logical reason why is it not possible for pulldata to have primary key consisting of multiple column?

Any feedback appreciated.
Thanks,
Jordan

Hi Jordan,

Pulldata() unfortunately has it's limits. Usually for something like this I use an Xpath. That way you can have as many criteria as you want and you can pull the label rather than the name if that suits you.

It might look something like this but I didnt fully understand the desired logic so you might need to adapt:
instance('household_csv')/root/item[member_num=${member_key} or member_id =${member_key}]/name

This type of XML is really quick to learn and quite powerful. You use it in the calculation column of your XLSform (assuming that is how you are building your form).