The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
How to keep a copied value from a lookup field in the edition?
I'm reformulating this question because my last related post was a little complex to understand.
I'm using a lookup field as suggested amount from a list of concepts. When the user selects a Concept from a lookup field, a field with a suggested amount gets copied from the lookup field data in another Amount field.
But if the user chose not select any product or changes the Amount value, and later he edits the entry, the suggested amount gets blank or reverted.
EXAMPLES:
CASE 1
In this case, the user selects a common concept from the lookup field, and Amount gets copied from Form2-Concepts-SuggestedAmount.
FORM1 - ENTRIES
SELECT CONCEPT (Lookup field - source: FORM2 - Concepts - Name): Monthly data plan
CONCEPT (Text field): Blank
AMOUNT (Text field - source: FORM2 - Concepts - SuggestedAmount): $45
CASE 2
Here, because the concept is not common and not in the list, the user may have elected leaving SELECT CONCEPT blank, therefore he entered CONCEPT and AMOUNT manually:
FORM1 - ENTRIES
SELECT CONCEPT: (Lookup field - source: FORM2 - Concepts - Name): Blank
CONCEPT: (Text field): Balloons for party
AMOUNT: (Text field - source: FORM2 - Concepts - SuggestedAmount): $11 (copied as blank, user entered amount manually).
CASE 3
Because the concept is common but amount sometimes varies, the user may choose concept in SELECT CONCEPT and manually changes the AMOUNT field:
FORM1 - ENTRIES
SELECT CONCEPT: (Lookup field - source: FORM2 - Concepts - Name): Gasoline
CONCEPT: (Text field): Blank
AMOUNT: (Text field - source: FORM2 - Concepts - SuggestedAmount): $29 (copied from the list as $38, but the user changes amount manually).
***
In CASE 1 there is no problem.
In CASE 2, the user later edits the entry, and as SELECT CONCEPT was blank, the AMOUNT field gets blanked.
In CASE 3 the user later edits the entry, SELECT CONCEPT remains but the AMOUNT field reverts to $38.
The idea is to keep the final AMOUNT value in the edition of the entry.
Suggesting values is a nice use for Lookup fields. Surely I could leave the SUGGESTED AMOUNT only as a suggestion field and create another field to manually copy the value, but is no so elegant.
Would anybody point me in the right direction to accomplish this?
January 18, 2018 at 2:19 pm
It doesn't sound like it will ever work that way as it's relying on another piece of data from a database. It's not going to let you load up a value that doesn't exist in the database for the lookup field.
You need to maybe add an additional field where the user can edit the value of that field. You can use form shortcode to display only certain fields. In one spot they might see all but the one hidden "edit" field and in another only the edit field. You'll have to be creative.
Discussion closed.