Page 1 of 1

Issue with related items

Posted: 12 Jan 2016
by Eax
Hello,


I have a problem with my related items :


This is my parent item with a related item :

Image

It's filter by Filter and "IDParent" it's a single text field who populate my Paren'ts ID.

And now this is my child item :

Image

it said "None element's can be display" from my Paren'ts list.

I made a filter between my "IDParent" and "ID" from the parent list.

Any idea ?

Re: Issue with related items

Posted: 13 Jan 2016
by rostislav
Let me get it straight.

You have two lists, parent and child. The relationship is built throught the IDParent list attribute on the child list. The related items control on the parent form works fine. You also want to have a related items control on the child list. You're setting up the filter as such: "IDParent" (child list) to "ID" (parent list) and nothing shows up.

Things to check here:

1. There is indeed an item that should be displayed for the particular case you're testing

2. You say that IDParent is a text field (better make it a numeric field, as you're comparing numerals) - maybe you have a space in there and that's why the filtering is coming out as false.

Otherwise what you're doing seems to be fine. We can schedule a Team Viewer session with you if you're still unable to solve the issue.

Re: Issue with related items

Posted: 18 Jan 2016
by Eax
Changing my feld, it's working now. Thanks



Anyway i have another problem, when i'm trying to put 2 values on the same field, ihave this on my DispForm :

99999999TEST- FVF Plumsail.FD.CreateCrossSiteLookupEditField('cslSociete', 'c0b72ba3-8bfc-4332-9dba-25039fa5e402', 'Societe');



This my JS :



fd.onsubmit(function() {
fd.field('Code_x0020_Affaire_x0020__x002f_').value(fd.field('Title').value() + '-' + fd.field('Societe').control()._el().text());
return true;
});

Re: Issue with related items

Posted: 18 Jan 2016
by rostislav
You didn't say what you meant the value to be, nor what types of the fields those fields are. My recommendation would be to reevaluate how you're retrieving and assigning those values in relation to the field types, for that please check this page: http://spform.com/forms-designer- ... eld-values

If after looking at the page you're still running into problems, please describe the situation in more detail: what the field types are and what are the values that they have.

Re: Issue with related items

Posted: 19 Jan 2016
by Eax
When i save a new item, i have a field (single text).

In this field, i want to put 2 values from the same form? My field 'Title' is a single text field and my field 'Societe' is a lookup field. When i tryed

fd.field('Code_x0020_Affaire_x0020__x002f_').value(fd.field('Title').value() + '-' + fd.field('Societe').control().value());

The ID appear but not the name

Re: Issue with related items

Posted: 19 Jan 2016
by rostislav
If you would have looked at the link I've posted above you'd see that

Code: Select all

fd.field('Lookup').value();
gives you the ID of the entity, whereas

Code: Select all

fd.field('Lookup').control('getSelectedText');
gives you the text value of the selected entity.

So in your case you need to use:

Code: Select all

fd.field('Societe').control('getSelectedText');