Request properties (new style): Change parameter type dynamically

Hi,

In v92 I have a request property with a "User prompt" parameter that shows a selectable list of organizations the recipient belongs to when requesting a specific product.

A change has been approved that this selection should be skipped if the recipient belongs to only one organization. So I'm using the OnPropertyChangedScript to get a list of organizations for the recipient and try to  set the parameter to "Calculated" should this list had only one element. 

Problems I need help on:

  1. I'm unable to get the UID_PersonOrdered in the script. I've been browsing the forums and found this Provider.GetValue(Of string)("UID_PersonOrdered") object (not in the documentation) but that is not returning any value at all.
  2. I don't know how to set the parameter to "Calculated". I know how to set it to readonly (ParameterSet("param").IsReadonly) or mandatory, but I cannot find how to alter the ParameterType.
  3. Juan Carlos, forget it, that's not the way at all.

Any ideas?
Thanks.

Parents
  • Regarding number 2, I think that you cannot change the parameter type to Query in the script.  But should be able to set the value of the parameter in the script with ParameterSet("ParameterName").Value = <Your Value> and setting the parameter to ReadOnly and make it optional with ParameterSet("ParameterName").IsReadOnly = True and ParameterSet("ParameterName").IsMandatory = False

    Regarding number 1, I need to dig into this thoroughly about how to access the property.

Reply
  • Regarding number 2, I think that you cannot change the parameter type to Query in the script.  But should be able to set the value of the parameter in the script with ParameterSet("ParameterName").Value = <Your Value> and setting the parameter to ReadOnly and make it optional with ParameterSet("ParameterName").IsReadOnly = True and ParameterSet("ParameterName").IsMandatory = False

    Regarding number 1, I need to dig into this thoroughly about how to access the property.

Children