[Solved] Entity Screen & Entity Field Issues

Two of my enitites are Customers and Staff, each with slightly different fields in their setup. Customers has a primary field of Customer Number and Staff has a primary field of Name. However when loading the entity screens to add, create or amend these entities my staff entity screen does not display the same fields as setup under entities>entity types>custom fields

See below for my Customer entity custom field setup and the entity screen showing these fields correctly displayed



As you can see above the primary field of customer number is first followed by the other fields in the correct order

This issue i have is with my staff entity, as the entity screen fields do not match the custom field setup

So the order on my entity screen should be my primary field “Name” followed by the order of the remaining fields “Employee Number” down to “Discount 100”. However the entity screen does not display these fields (unlike my customer entity which is perfect)

I have completely deleted my staff entity and anything related to it, logged out, closed POS, restarted program and re-created my staff entity and that didnt fix the issue. ive even cloned my customer entites as i know that is working, but that still didnt work

Any Ideas why the entity screen fields do not reflect the fields setup in entities>Custom fields?

If you select an Entity, then click Edit <Entity>, then right-click and go into Design Mode, can you add the missing Field as a Column?

Also, locate the Layout files and rename the one that pertains to the Screen in question, so that SambaPOS can re-create it.

C:\Users\<username>\Documents\SambaPOS4\Layout

the entity screen isnt one that i have manually created using design mode so i cant right click it

ignore that ive just done what you said and when i click on edit the correct fields are displayed, it is only on the first screen that they are not correct

From the first screen the column header right click it then choose Column chooser Drag the column out into the box. then drag it back in. Or is the missing column in that box already?

I think @QMcKay is on to it though. You probably need to reset the layout.

on column chooser there are no columns to select, they are all already visible, ill try the layout file now

For sure, try what @Jesse said first, and if that doesn’t work for you, go after the Layout file.

Drag the column in question into the box… then save and reload. THen open it up again and drag it back out…

LOL, that’s just the point, the column isn’t appearing anywhere - not in the header, nor the chooser.

I have seen this strange behavior before, and I reset (rename or delete) the Layout file. Magic!

In the screenshot its showing Name twice. So I was thinking the column was just corrupted… Maybe dumping it out and then back in would reset the column… was just a hunch. When I said drag the column I meant the second Name column as it was supposed to be the correct one.

Ah, I see, you’re probably correct @Jesse. I hadn’t noticed that. That has to do with the (corrupt) Layout file as well I believe.

tried the column chooser but no joy, deleting the layout file worked (it then made the fields of my customer entities wrong so i deleted both and restarted samba and now they are perfect)

Thanks again!

2 Likes

Well we all learned something.

  1. Layout Files can get corrupted easily.
  2. Can not reset it internally had to just delete and regenerate.

It would be nice if we could figure out what causes the corruption.

I’ve also noticed that file corruption while adding new fields and it is probably a bug with the library we’re using. I thought about removing layout support however I’ve noticed if we setup it once it works fine without corruption so I left it as is. Maybe I can implement a simple validation to delete file automatically when fields changes.

3 Likes