Referencing records that have not been submitted yet

Hello everyone,

:warning:This might be a bit confusing, but please bare with me.

So basically, I have two forms A and B.

1- Form B has a reference field that references a specific field in Form A.

2- Form A also has a reference field to Form B.


Action:

While filling Form A, I want to press “add record in Form B”.

This would naturally take me to fill Form B, BUT remember that Form B also has a field that is referenced from Form A.

I want to be able to choose the data that I had just collected in Form A (not submitted) to put it in Form B in the reference field.

The issue with references is that they only show you data that has already been submitted.


Would it be possible to request this as a feature? A way of “Caching” the data while doing entry in between two forms simultaneously ?

I will look forward to any feedback on this.

Thanks!

Hello Ahmed,

We acknowledge receipt of this feature request.

Could you please share more information about the use case, workflow, or scenario where this feature would be useful?

This will help us fully understand what it would entail, including any specific requirements, expected outcomes, or constraints we should consider.

Thanks,

Timothy

Hi Timothy,

Thanks for taking this into account.

I will provide a use case below.

Let us say we have two databases.

1 - Database A registers “Participants”

2 - Database B registers “Training sessions”

I am registering a person that is attending one of our training sessions, and so naturally I would use form A to do that.

For us to know which individuals attended which training session we have a reference field in form A that asks for the Training ID in form B ( or any other detail of that training).

However, as a user I have not added that training into database B, and so intuitively, when I come across the reference field in A I would just “press add record in form B” and it would take me to form B to fill it.

Here is the catch :hook:

Form B also has a reference field to A and asks for the Individual ID that attended that specific Training, but since the individual is not yet registered in A, I cannot find their ID in the reference field.

This entails generating the ID of a record before it gets submitted and also keeping the data saved somewhere before submission.

I hope this makes sense.

If not, I would be glad to provide more details.

Best,

Hi Ahmed,

This will actually be possible in the next iteration of the data entry form, which we’re aiming to support better performance for very large datasets, and to work more seamlessly with the interactive table.

In the new version, as soon as you start adding or editing a record, your changes are immediately stored as a draft. So if you add a referenced record inline, the draft will already be visible.

You can actually try this new version out by opening the web application with a feature flag:

https://www.activityinfo.org/app?dataentry=new

I think it should work exactly as you describe. Can you give it a try and let me know if it works?

Hi Alex,
I hope you are doing well.

This is great news! I have gone ahead and tested it. Here is a screenshot:

Beneficiary ID is a record serial number. I understand it appears to be blank because the record has not been submitted yet, but do you think if the record eventually gets submitted, it would also get updated ?

Otherwise, yes it does work as I imagined thank you for this effort!

Best,

Nice! Yes, indeed serial numbers are only populated by the server so they will appear blank in drafts. So it looks like it works :partying_face:

If you want to improve the experience for users, you can define a custom lookup, like:

CONCAT(IF(ISBLANK(BENE_ID), "Pending", BENE_ID), " - ", NAME_EN, " / ", NAME_AR)

Then you’ve have a single dropdown that combines all the information nicely.

1 Like

Nice! thanks for the tip as well!