Crow Canyon Software Forum
multi lookup column question
Quote from anguyen on October 17, 2023, 5:33 pmI have a quick question regarding a multi-lookup column. I have a lookup column named 'Carb' and would like to allow users to select multiple choices for this lookup column using checkboxes.
I've updated it to a multi-lookup. However, I'm facing an issue with auto-filling a 'Price' column (numbers) when both items in the multi-lookup column are selected.
Since I updated the 'Carb' column to a multi-lookup, the 'Price' column no longer appears in the form action I had set up previously.
I have a quick question regarding a multi-lookup column. I have a lookup column named 'Carb' and would like to allow users to select multiple choices for this lookup column using checkboxes.
I've updated it to a multi-lookup. However, I'm facing an issue with auto-filling a 'Price' column (numbers) when both items in the multi-lookup column are selected.
Since I updated the 'Carb' column to a multi-lookup, the 'Price' column no longer appears in the form action I had set up previously.
Quote from James Restivo on October 19, 2023, 9:21 amHi @anguyen
Can you add more details about the issue? Is it that the Price field is not getting auto-filled? Or is the issue that the Price field is not showing on your form at all? If you can add any screenshots, they will be helpful. Thank you!
Hi @anguyen
Can you add more details about the issue? Is it that the Price field is not getting auto-filled? Or is the issue that the Price field is not showing on your form at all? If you can add any screenshots, they will be helpful. Thank you!
Quote from anguyen on October 19, 2023, 12:47 pmHello James,
That is correct, I am trying to get the field price auto-filled. Right now, under configure lookup column > lookup View, has one item(the other list).
I'm trying to setup where a user can click more than one of the checkbox from the lookup column, and have the autofill price filled on the 'price' column along with an 'add' value in case they click more than one option.
Hello James,
That is correct, I am trying to get the field price auto-filled. Right now, under configure lookup column > lookup View, has one item(the other list).
I'm trying to setup where a user can click more than one of the checkbox from the lookup column, and have the autofill price filled on the 'price' column along with an 'add' value in case they click more than one option.
Uploaded files:
Quote from James Restivo on October 19, 2023, 1:41 pmOk. Great. I understand better what it is you're trying to do. If you're using the autofill option from the settings of the Carb lookup column, that won't work for multi-select lookups. A Form Event Action is what you'll need. Anytime the Carb column is changed, you'll want to run a function to update the value in Price.
I assume Price is a value on the Carb lookup list. If so you can try the following:
- Set up a Form Event Action to run when the "Carb" column is changed (screenshot 1)
- Configure a Fetch List Items action to get items from the Carb list (screenshot 2). Make sure to select "Items" in the "Type" field so you can pull back multiple items from the Carb list.
- Configure an Update Form Controls action to get the price from the query of the Carb list, with this syntax in the Value field: CCSQLGetPrice##$sum([Price|Price])
Note: Make sure that where it says "Price" above matches the display name (left side) and internal name (right side) of the field in the Carb list.
Once that is configured, anytime someone selects or deselects an option in the Carb list, the Price will automatically update.
Let me know if this helps!
Ok. Great. I understand better what it is you're trying to do. If you're using the autofill option from the settings of the Carb lookup column, that won't work for multi-select lookups. A Form Event Action is what you'll need. Anytime the Carb column is changed, you'll want to run a function to update the value in Price.
I assume Price is a value on the Carb lookup list. If so you can try the following:
- Set up a Form Event Action to run when the "Carb" column is changed (screenshot 1)
- Configure a Fetch List Items action to get items from the Carb list (screenshot 2). Make sure to select "Items" in the "Type" field so you can pull back multiple items from the Carb list.
- Configure an Update Form Controls action to get the price from the query of the Carb list, with this syntax in the Value field: CCSQLGetPrice##$sum([Price|Price])
Note: Make sure that where it says "Price" above matches the display name (left side) and internal name (right side) of the field in the Carb list.
Once that is configured, anytime someone selects or deselects an option in the Carb list, the Price will automatically update.
Let me know if this helps!
Uploaded files:
Quote from anguyen on October 19, 2023, 2:05 pmThank you for your help James! You've honestly saved me from building 34 columns.
I was checking my other multi lookup columns when trying to execute form actions 'fetch items'. Would there be any instances if a lookup column does not appear as an option when 'configuring fetch items actions?
Thank you for your help James! You've honestly saved me from building 34 columns.
I was checking my other multi lookup columns when trying to execute form actions 'fetch items'. Would there be any instances if a lookup column does not appear as an option when 'configuring fetch items actions?
Quote from James Restivo on October 23, 2023, 4:40 pmCan you share the settings of the lookup columns that aren't appearing?
Can you share the settings of the lookup columns that aren't appearing?