Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.1.3] Problem(s) changing parameter #91

Open
martijn1247812 opened this issue May 28, 2020 · 0 comments
Open

[5.1.3] Problem(s) changing parameter #91

martijn1247812 opened this issue May 28, 2020 · 0 comments

Comments

@martijn1247812
Copy link

Hi I love the toolset!

I have a problem with finding the parameter by name.
using something like: prm = wb_parameters.get_parameter_by_name(param)
I have changed the following and it works:

def get_parameter_by_name(self, parameter_name: str) -> TableauParameter:
    for p in self._parameters:
        # if self.parameters[p].name == parameter_name: ##CHANGE MB
        if p == parameter_name:
            return self._parameters[p]
    else:
        raise NoMatchFoundException('No parameter named {}'.format(parameter_name))

Another this is that i was used to just put the (string)data in the parameter and it worked. Now I seem to convert is to its proper type. Problem with list-parameters though...

                    if prm.datatype == 'integer':
                        prm.current_value = int(new_value)
                    elif prm.datatype == 'real':
                        prm.current_value = float(new_value)
                    else:
                        prm.current_value = new_value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant