Open sumitsum opened 3 years ago
Another urgent need is to be able to store a reference to another collection document when adding or updating another document. With the _ref.path
field we have the reference path to another document but need a mechanism to convert that string into a Firestore document reference. So assuming AuthUserAddEventDropdown.selectedOptionValue
has the String value "events/ZciTEo2EpxEoPMw4OFsx" then method "Add Document to Collection" query body could possibly be...
{
"name": "{{UserAddFirstNameInput.text}}",
"surname": "{{UserAddLastNameInput.text}}",
"email": "{{UserAddEmailAddressInput.text.toLowerCase()}}",
"role": "{{UserAddRoleInput.text}}",
"event": "{{firestore.doc(UserAddEventDropdown.selectedOptionValue)}}",
"createdBy": "{{appsmith.user.email}}"
}
Or following the current implementation of Timestamp and Delete this could be another field called "Reference Value Path", which would be a map of field paths to reference paths...
{ "event": "{{UserAddEventDropdown.selectedOptionValue}}" }
wdyt?
On a side note, Timestamp support was already been added so I guess that can be removed from the issue title and be replaced with Document Reference
This is similar to https://github.com/appsmithorg/appsmith/issues/7176
Another user is requesting support for Firebase timestamps: https://discord.com/channels/725602949748752515/1221163808706400317/1221163808706400317
Summary
Requested by communtity:
Note:
Additional Context
Requested on PR https://github.com/appsmithorg/appsmith/issues/3475