You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My goal is to a have textfield within a datagrid that is unique. Each row with this same textfield should also be unique. I have tried using JSON Logic a couple different ways, but I am not getting the expected result.
I also tried setting "unique" : true, however is doesn't work for my case or I am simply using it wrong. Still a novice and learning. I appreciate any help or experience anyone can share.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My goal is to a have textfield within a datagrid that is unique. Each row with this same textfield should also be unique. I have tried using JSON Logic a couple different ways, but I am not getting the expected result.
My goal is to have something similar to this:
My results now with JSON Logic:
JSON (w/ JSON Logic used) :
{ "display": "form", "components": [ { "label": "Data Grid", "reorder": false, "addAnotherPosition": "bottom", "layoutFixed": false, "enableRowGroups": false, "initEmpty": false, "tableView": false, "defaultValue": [ { "myField": "" }, { "myField": "" } ], "key": "dataGrid", "type": "datagrid", "input": true, "components": [ { "label": "Text Field", "tableView": true, "validate": { "json": { "if": [ { "some": [ { "var": "data.dataGrid" }, { "!==": [ { "var": "item.myField" }, { "var": "input" } ] } ] }, true, "Value already exists in datagrid" ] } }, "key": "myField", "type": "textfield", "input": true }, { "label": "Text Field", "tableView": true, "key": "textField", "type": "textfield", "input": true } ] } ] }
I also tried setting "unique" : true, however is doesn't work for my case or I am simply using it wrong. Still a novice and learning. I appreciate any help or experience anyone can share.
Beta Was this translation helpful? Give feedback.
All reactions