Display hyperlink if validation fails

Mono

Member
Hi
I have an database join element with a validation rule (isUnique).

I have created a 'display element' hyperlink to edit the record selected that fails the validation.

Is there a way to disable this element and enable it if the validation fails?
 
Hi mono,

if the validation fails, the user can not submit the form. I don't know, why you need a hyperlink to edit the record.
Failed valiation message is on top of the form and the validated element is marked.

Cheers,
Bianka
 
Hi Bea
Thanks for your help the other day, my problem today is further from that.
My validation is on a database join to check if a joined record has been entered.

I think maybe a picture will explain more clearly my intention.

When the user tries to add a new child record with a repeat group ( operating name, address line 1 etc are in a repeat group) the validation checks if there are any already existing child record.
Its at this point I'd like my hyperlink, marked by the red star, to become visible as a shortcut to the existing record.

I worry that I am re inventing the wheel and Fabrik already has this!

https://ibb.co/zbG2FQB



zbG2FQB
 
Hi Mono,

you can set the dbjoin element linked to other table:

Link to joined record - Applies when in a detailed view, or if the element's access levels mean that it is set to read only when in a form. If this option is selected, then the read only value is encased in a link. This link points to a detailed view of the record referenced by the database join element's data.
 

Attachments

  • Screen Shot 2019-06-27 at 16.50.27.png
    Screen Shot 2019-06-27 at 16.50.27.png
    36.1 KB · Views: 82
Hi Bea

I looked at the things you said but I'm struggling to understand what I need to do.
I set my DB Join element ACL to superuser on both add and edit.
I set link to joined record to yes.

When I edit an existing record , it works like you said and the DB Join just becomes a link to the Customer record.

When I click on add new record, There is no DB Join element visible to select the Customer.

My issue is trying to avoid the user entering 'Marshall Haversake' as shown in the picture, I need it to be like 'Arnold Nosert'

https://ibb.co/Y3BBfqv



Bea I really appreciate your help and patience
 
Hi Mono,

you should start the join without validation and limit access. I am not really sure, which are your settings..
The database join element with a validation rule (isUnique) for a text field is probably not practical, because user can write names in different ways.

You should start from the beginning...

customer table: id, customer (field) >>> are customers = jusers?
adress table: id, customer (dbjoin, id as value, customer as label)

If you set now the validation (isUnique) to customer it works, because it checks the customer_id. Users can not select same customer twice.

It's easier to understand, where you want to go, if you write down the structure of your tables.
 
Thanks Bea
Customers are not jusers.

I can get my validation to prevent user from creating a duplicate join, but I can't get a nice easy way to lead the user to the existing joined record, so they can add another repeat group and enter the info there.

I'm going to keep working away, I will find a solution hopefully.

Thanks again for help.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top