Home › Forums › Modern DFFS › Bug in lookup if the lookup value contains a hyphen
- This topic has 15 replies, 3 voices, and was last updated 1 year, 5 months ago by Alexander Bautz.
-
AuthorPosts
-
-
January 31, 2023 at 23:15 #36343
I create List A and add a column “Entity”. I add list items and enter a string value into the “Entity” column that contains a hyphen (e.g. “Solar-Planet” or “Solar-Star”)
I create List B and add a Lookup colum “Entity” that looks up List A and Column Entity.
I create a DFFS New and Edit form for List B.
I create a new list item in List B. It creates OK
I EDIT the list item in List B and the displayed value of the lookup has removed all the characters before the hyphen. (for example if I selected “Solar-Planet” it now only shows the lookup string “Planet”. If I SAVE this form then it corrupts the lookup./Marcus
-
February 1, 2023 at 09:46 #36345
Just tried it with a comma and a space and I get the same effect.
-
February 1, 2023 at 15:45 #36348
BTW I am using Edge
-
February 1, 2023 at 16:47 #36349
Hi,
I set up a test based on your description, but cannot reproduce it. Can you add some screenshots of the config, the lookup list and the error – if any in the dev tools (F12 > Console).If you don’t want to add the screenshots here you can email them to me.
Alexander
-
February 2, 2023 at 00:47 #36354
I have emailed you some screenshots and done some more investigation.
The lookup only seems to work correclty if you configure the lookup column to retrieve the “Title” column in the lookup list.
Any other column seems to produce the error occurs (e.g. the attached screenshot will produce the error)
Attachments:
-
February 2, 2023 at 16:28 #36358
Thanks for the clarification – I’ll get this fixed and release a new version tomorrow.
Alexander
-
February 3, 2023 at 17:45 #36370
Just tried the new release and it works – but only if there is ONE lookup field on the form.
If you have TWO lookup columns with EACH lookup configured for the same source list and field then you get another error:
Attachments:
-
February 3, 2023 at 18:07 #36374
I’m not able to reproduce this error. Are you using any filters on these lookups or are they just plain lookup fields?
Alexander
-
February 3, 2023 at 18:22 #36376
They are standard lookups, no filters, no custom code etc. Strange thing is that it does show the correct value in the choice field but also throws a red error:
Attachments:
-
February 3, 2023 at 18:32 #36379
If I change the lookup to look up “Title” there is no error
-
February 3, 2023 at 19:06 #36381
OK, I’ll do some more testing and try to figure it out during the weekend.
Alexander
-
February 3, 2023 at 20:24 #36382
I think I found the cause, but need you to confirm: I think this was caused by a bug in my code that did not take into account that the value in the field could be null (empty).
Can you confirm that the value in the field you are using for your lookup was empty for one or more of the items in the lookup list?
Alexander
-
February 6, 2023 at 21:35 #36393
I have released a new version that should fix the remaining problem with the “cannot read properties of null” error.
Let me know how it works out.
Alexander
-
February 9, 2023 at 14:47 #36407
1.0.10.0 has fixed it.
Well done Alexander -
June 13, 2023 at 21:42 #36859
I’m having this error too, running an earlier version. I can’t find instructions for upgrading to the most recent version for Modern DFFS – how does it work?
-
June 14, 2023 at 15:58 #36860
You just drag and drop the new version into the app catalog – replacing the old version.
Alexander
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.