Forum Academy Marketplace Showcase Pricing Features

Setting the value of a Custom State to a User's input in a RG

Is there a way to set the Value of a Custom State to be whatever a user has entered in an Input in a Repeating Group?
I thought there was but the only options I see for setting the Values are other custom states attached to the RG.
It’s getting late in the day and my brain’s frazzled but if someone could point me in the right direction, I’d be very happy.
Many thanks

Hi there, @joefarrowsmith… maybe you could provide some screenshots because you should be able to do what you have described. You could use the An input’s value is changed event, and when the input is changed, you should be able to set the custom state to This input's value.

I could easily be missing something based on the limited info in your post, but hopefully this helps in some way.

Best…
Mike

Hi
Many thanks for coming back to me.

I’m not sure how helpful these are but I’ll try to explain…

Screen Shot 2021-06-08 at 18.27.18

I have two types of product, In-Store (ie made by us) and Third Party (ie made by someone else). Lists of each type are presented to the users in a RG for In Store products and another RG for Third Party products. The users can select products from either RG using Ionic Checkboxes and the selected Products appear in the RGs in the screenshot. Even though there are two RGs, the effect is that it looks like one single list.
Once the product is selected, I want the user to be able to put in a Quantity (assuming they want more than one) in the InputQty and the Total Price is calculated with a Grand Total outside of the RGs. This all works fine.
Where I’m coming unstuck is recording the “Order” in a Data Type. When the user hits the “Save and Go To Payment” button, I need it to send the data in both RGs to an Orders table. This sort of works but the Qty won’t move across when I create a workflow to “Create a New Thing” in an attempt to update the fields in the Orders data type. My main issue is that I can’t find the Input for Quantity listed in the Workflow using the Expression builder. All I can do is select the name of a RG that contains the Qty input and then I just see Custom States I’ve saved on that RG. As a workaround, I’ve tried setting up a Custom State on each RG and Setting the State to the Quantity so that the quantities in the Order data type update with the value of the Custom State (if that makes sense) but, having done so, they remain blank in the underlying data.
I don’t know if that makes sense and if you’ve made it this far, I’m very grateful. I’m wondering if I’ve taken a wrong turn and if someone could redirect me, I’d be hugely thankful.
All the best