Match row from data source to rows in xxx if

Hello,

I'm new to Honeycode and I'm facing the following issue :

I would like to use "update or insert rows" when clicking a button, with a condition. This condition is like : the row modified in a table depends on the choice of the user in a picklist. To illustrate, if the user chose the "SHD-MOC4-01" ID in the picklist, the app will have to find this ID in a table and update a column with the corresponding row if the app succeed to find it.
It ran like a charm (but with a warning) until now.

The condition formula is :
Match row from data source to rows in xxx...
If this data is : =$[Picklist][ID]
Is in xxx column : [ID]

Which xxx is my table where I would like to find the row to update the correct cell.

Thank you in advance for your support

Hi @Anto-c92a, Welcome to Honeycode!

I am unclear on the issue so if you can provide any screenshots of the warning/automation setup, that would be very helpful. Generally speaking:

If [ID] is a rowlink column in table2 from table1 and your picklist UI is also pulling it's options from table1, then you can just use:

If this data is : =$[Picklist]
Is in table2 column : [ID]

But if you are writing to the same table (only table1) then the way you did $[Picklist][ID] it is correct.

Thank you very much for the help @Kamran !

I'm going to try to explain better with screen shots :wink:

So, here is my form where the picklist is :

The ID is taken from this table : Capture4

The code (condition) attached to the button in the form is :

The action the button have to do is : Capture3

Variablesemphasized text :
"ID" is in the "COMETE" table
"Code affaire lié" is in the "COMETE" table
"Code affaire" is in the "Historique" table which is here :

To put it in a nutshell :
I would like the user to pick an ID in the picklist circeled in red. The ID in the picklist are taken from the "COMETE" table. When the user click on the "valider" button, I would like the software to take the "Code affaire" (which is in an other picklist on the same screen of the form) and write it to "Code affaire lié" (which is in the "COMETE" table). But the software has to chose the right row to write the "Code affaire lié". The right row is the row with the right "ID".

I hope you catch it ! :grin:

Sorry for the multiple posts but as I'm a new user, I'm not allowed to post several image in the same post.
Thank you again for helping :kissing_heart:

Moderator note: Edited out personal information.

Thanks for the detailed info.

On button press:

  1. Use the Add or Update row option
  2. In the "Update rows in or add row to:" section, select Comete table
  3. In the Match row from data:

If this data:
=$[Picklist_Comete1][ID]
Is in
=[ID]

  1. Within the same step, set the "Update matched rows in, or add a new row to, Comete with this data" section with

Screen Shot 2020-08-21 at 11.20.06 AM

Make sure you select the "Value" and not formula for the "as a:" section.

Please let me know if you continue to experience issues or if I misunderstood the issue.

Happy building!

Thank you for your reply ! I was using the formula you gave me but it stops working for no reason. No it's working again :rofl:

Btw, I do not really understand the formula $[Picklist_Comete1][ID] which I suppose, is equivalent to a FINDROW with structured references. I do not understand why I have to put [ID] after $[Picklist_Comete1].

Glad to hear it's working.

The reason for using $[Picklist_Comete1][ID] is to ensure that the data types match for comparison since in this table there is no rowlink to the row itself. You could add another column and set the formula to thisrow() and use that column to avoid using [ID] in the Match step:

If this data:
=$[Picklist_Comete1]
Is in
=[NewColumnWithThisRow]

Happy building!

I think I catched it ! I am going to meditate on this. Thank you for the explanation :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.