susom / redcap-em-giftcard-reward

An EM to help automate the reward of gift cards for survey and other participation
MIT License
3 stars 1 forks source link

Reward ID not saving in study project #5

Closed meagan-crowther closed 2 years ago

meagan-crowther commented 2 years ago

@123andy Thanks for this module. Having an issue that the Reward ID is not saving in Project library (left blank) but all details are saving in the giftcard library fine. This means in longitudinal project baseline giftcard gets re-sent as well because the Record ID is still empty

yasukawa commented 2 years ago

Hi Meagan,

Is the gift card status field populating with 'Reserved' in your gift card project? And did you select the Reward ID field and Reward ID Status Field in the EM config file?

Lee Ann

meagan-crowther commented 2 years ago

 Hi Lee Ann Yes giftcard status field is populating in giftcard library: [image0.jpeg]

EM is configured with Reward ID field:[image2.jpeg]

But in Project the designated field stays blank [image3.jpeg]

Thanks Meagan

yasukawa commented 2 years ago

Hi Meagan,

Unfortunately I can't see the images. Can you resend them as attachments.

I'm still a little unclear. In the gift card library project, you should see the record ID of the gift card project and in the gift card project you should see the record ID of the gift card library project as well as the gift card record status. Are you seeing the gift card status in your gift card project (not the gift card library project).

It seems weird to me that the status would save in your gift card project but not the record ID of the library project since they both save in the same statement.

Lee Ann

meagan-crowther commented 2 years ago

Hi Lee Ann Sorry I was not clear enough in my description. I hope the information below is clearer In the gift card library project (where all giftcards are stored) the record ID and gift card status is being saved when giftcard is sent. It functions as I would expect. In the study project (where the logic for the eligibility is) there is no update to the record (i.e. the field configured for "Reward ID Field: Specify a field in this project where the ID of the Gift Card assigned to this reward will be stored:" stays blank) when a giftcard is awarded

Giftcard library: giftcard_library Gift card project/study project after reward sent: project Gift card project/study project configuration: reward_id

yasukawa commented 2 years ago

Hi Meagan,

Thank you for the images - they are worth a thousand words!

The problem is the Reward ID Status field should be a text field. The word 'Reserved' is written to the field. I'm sorry the configuration does not make that clear. The reason why that field is a text field instead of radio button is because it may store other information. For instance, if there are no gift cards to disperse but the record is eligible, a message is written there to say the record is eligible but could not be sent a card.

Please let me know if you run into other problems.

Lee Ann

meagan-crowther commented 2 years ago

Thank you soo much for your time Lee Ann. It is much appreciated! It seems to be working fine now. Thank you again for this module.