Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Lookup - Multiple Data-Load-Target (Read 1752 times) previous topic - next topic

Lookup - Multiple Data-Load-Target

Dear Support,

Just would like to report a bug.

1. I have multiple data-load-target lookup but only the first target in the list is working which is "day7" in this example:

<select required=""  id="ctrl-property_short_code" name="property_short_code" data-load-target="day7" data-load-path="<?php print_link('api/json/shift_template_day7_option_list') ?>" data-load-target="day6" data-load-path="<?php print_link('api/json/shift_template_day6_option_list') ?>" data-load-target="day5" data-load-path="<?php print_link('api/json/shift_template_day5_option_list') ?>" data-load-target="day4" data-load-path="<?php print_link('api/json/shift_template_day4_option_list') ?>" data-load-target="day3" data-load-path="<?php print_link('api/json/shift_template_day3_option_list') ?>" data-load-target="day2" data-load-path="<?php print_link('api/json/shift_template_day2_option_list') ?>" data-load-target="day1" data-load-path="<?php print_link('api/json/shift_template_day1_option_list') ?>"  placeholder="<?php print_lang('select_a_value_'); ?>"    class="custom-select" >
                                <option value=""><?php print_lang('select_a_value_'); ?></option>
                               
                                <?php
                                $property_short_code_options = $comp_model -> shift_template_property_short_code_option_list();
                                if(!empty($property_short_code_options)){
                                foreach($property_short_code_options as $arr){
                                $val = array_values($arr);
                                $selected = $this->set_field_selected('property_short_code',$val[0], '');
                                ?>
                                <option <?php echo $selected; ?> value="<?php echo $val[0]; ?>">
                                    <?php echo (!empty($val[1]) ? $val[1] : $val[0]); ?>
                                </option>
                                <?php
                                }
                                }
                                ?>
                               
                            </select>

Attached here is a screenshot of the Add form. Would appreciate your help.

2. A related issue, the lookup is not loading database value on Edit. Please advise how to handle.

Thanks a lot.

Kind regards,
Arnel


Re: Lookup - Multiple Data-Load-Target

Reply #2
Hi Willvin,

Attached is the screenshot in pdf.

Hope to hear from you soon. Thanks.

Cheers,
Arnel

Re: Lookup - Multiple Data-Load-Target

Reply #3
 @Arnel‍, I need the screenshot of the Data Table configuration, not the Custom SQL, I want to see how you configured it. Thanks.

Re: Lookup - Multiple Data-Load-Target

Reply #4
Hi Willvin,

Here are the data tables for your reference. Thanks.

Cheers,
Arnel

Re: Lookup - Multiple Data-Load-Target

Reply #5
 @Arnel, sorry, I think you got me wrong, this is an example of what I am asking of (find the attachment below).

Re: Lookup - Multiple Data-Load-Target

Reply #6
Hi Willvin,

Sorry about that. Please see attachment.

Many Thanks,
Arnel

Re: Lookup - Multiple Data-Load-Target

Reply #7
 @Arnel,  I understand your issue properly now, it seems to be a bug. we would look into it and I'll update you when it gets resolved. thanks for your feedback.

Re: Lookup - Multiple Data-Load-Target

Reply #8
I got the same issue.

dynamic lookup is not working on varchar fields. also not working second lookup fields.

wrote this thread https://phprad.com/forum/index.php?topic=371.0

hope this bugs will be fixed.


 

Re: Lookup - Multiple Data-Load-Target

Reply #9
Dear Support,

I just would like to inform you that the issue still exists in v2.6.4. Hope you can include the fix on the next version.

Thanks a lot.

Regards,
Arnel