Jump to content
  • 0

Triggered Actions, Lookup Tables and Hidden Fields


ResponsePro

Question

Hi,

I have a submission form that will register my customers and it needs to assign each customer to a group (example, Group 1- Group 5) with a hidden field. The customer needs to be auto-assigned to the correct customer group based on a field called 'Key-Code' which is correlates to the customer-group in the lookup table.

I am not sure the correct or best way to do what I am trying to do, but I assume it will require a lookup table, which I have created. The Customer Group ID LookUp Table has just two columns, the Key-Code field and the Customer Group ID field.

How can I apply the correct Customer Group ID to the hidden field using a Key-Code field to lookup the right group-id?

I have also mocked-up a diagram to help communicate my thoughts on the lookup table. I am really GREEN and my language and diagrams will show it, apologies  for misuse of key-terms or improper diagrams or concepts. I hope this is clear, I don't think it's a complicated task - I just lack the basic proper knowledge I think.

LookUpGroupID_KeyCode copy.pdf

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hello!

If I got your inquiry correct, base on the value of your key_code field, you want to automatically assign a value to your hidden group field which base on a lookup table.

In short, if the keycode is equal to X1, then the hidden field should have a value of Group1. Is that the case?

If yes, we can also use calculated value on your form on that case. Just set your group field into calculated value then use either a switch case formula or select formula to get the intended value base on the value of key code.

example formula

Case
when [@field:Key_code] = 'X1' then 'Group1'
when [@field:Key_code] = 'X2' then 'Group2'
when [@field:Key_code] = 'X3' then 'Group3'
when [@field:Key_code] = 'X4' then 'Group4'
end



Or a select formula to get the matching value from the lookup table.

Select group_Id from Lookup_table where Key-code = [@field:key_code]

I hope this helps.

 

Link to comment
Share on other sites

  • 0

Hai there!

Since you are using a look-up table, maybe a cascading form element will work for you? I tried to create a DataPage based on the information you provided. This will also work even if you update or add new KeyCode-GroupIDs. You can learn more about cascading elements here -> https://howto.caspio.com/datapages/datapage-components/cascading-elements/

I hope this helps!

image.png.181d099089aff845743864981a9a0839.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...