Skip Navigation

[Resolved] View with relationship

This support ticket is created 4 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 36 replies, has 3 voices.

Last updated by avansisI-2 3 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#1866439

Hi Cristhian,

I am totally lost on this topic, could you help me?

Each user should only be able to assign their business in this view, the list of all businesses should not appear

#1866761
Screen Shot 2020-12-06 at 7.36.44 AM.png

I am totally lost on this topic, could you help me?
First, you must move the Relationship Form into the correct location. I've explained this already, but it has not yet been moved. I will try to explain again in very simple terms. The Relationship Form shortcode must be removed from the View of Bonos here: hidden link
Instead, it should be placed in the "No items found" section of the View of Comercios here: hidden link

Each user should only be able to assign their business in this view, the list of all businesses should not appear
If you want to limit the Comercios posts options shown in the Relationship Form, you can filter those options by post author, in the Relationship Form editor. You can set the Comercios field options to include only posts where the author is the same as the current User. See the screenshot here showing the location of that filter, "Options by any author" should be changed.

#1866781

Great! thank so much im sorry for my problems with this ticket.

If there is a business already assigned, I still get the option to assign another. How can I restrict it?

Relation with this, is it possible that when a attacth a 'comprobante' and assign a 'comercio' status pass to used?

#1866887

If there is a business already assigned, I still get the option to assign another. How can I restrict it?
It looks like the shortcode structure of this View's loop was broken. You had this:

...
<!-- wpv-loop-end -->
	[/wpv-items-found]
		<strong>[wpml-string context="wpv-views"]	[wpv-no-items-found][cred-relationship-form form='seleccion-comercios-bonos' parent_item='$current']
[/wpml-string]</strong>

I have changed it for you. This is the correct way:

...
<!-- wpv-loop-end -->
	[/wpv-items-found]
		[wpv-no-items-found]<strong>[wpml-string context="wpv-views"][cred-relationship-form form='seleccion-comercios-bonos' parent_item='$current'][/wpml-string]</strong>[/wpv-no-items-found]

Relation with this, is it possible that when a attacth a 'comprobante' and assign a 'comercio' status pass to used?
I'm not sure what a comprobante is, or how it is attached to something. I'm not sure what status "used" means. What does that have to do with the relationship form here? I'm not clear.

#1866895

In this view I also have another column called 'comprobante' (it is the possibility of attaching a file) and 'estado'.

I want to be able to relate these three fields:

when the 'comprobante' is uploaded and the 'comercio' assigned, the status must change from unused to used

New threads created by Christian Cox and linked to this one are listed below:

https://toolset.com/forums/topic/change-post-taxonomy-when-image-field-is-uploaded-and-child-post-is-related/

#1867055

It sounds like you want to change the Estados taxonomy term for the parent Bonos post when:
1. The custom field image is uploaded for that Bonos post.
AND
2. At least one child Comercios post is associated with that Bonos post.

I've created a new ticket for this, since it's a different, somewhat complex topic.

#1867069

My issue is resolved now. Thank you!